Previous Thread
Next Thread
Print Thread
Rate Thread
how to add incldues into header and ipp side bar #285598 06/20/2005 10:34 PM
Joined: Aug 2004
Posts: 82
minto Offline OP
Power User
OP Offline
Power User
Joined: Aug 2004
Posts: 82
i tried to add
<?php require('/****/ubbthreads/pull.php'); ?>

but it just comes up empty? any ideas?

Sponsored Links
Re: how to add incldues into header and ipp side bar [Re: square_peg] #285599 06/21/2005 2:13 AM
Joined: May 2001
Posts: 550
Anno Offline
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 550
There seems to be a problem with the path.

Providing both the calling and the include file reside in the same directory, use
<?php require('pull.php'); ?>

Re: how to add incldues into header and ipp side bar [Re: domain123] #285600 06/21/2005 7:20 AM
Joined: Oct 2003
Posts: 2,305
scroungr Offline
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
aye and if in seperate directories supply the full path..

<?php require('/home/of/your/script/pull.php'); ?>

I usually do the full anyways from the home in case I move something at a later date...

Re: how to add incldues into header and ipp side bar [Re: 234234] #285601 06/22/2005 7:05 AM
Joined: Aug 2004
Posts: 82
minto Offline OP
Power User
OP Offline
Power User
Joined: Aug 2004
Posts: 82
i did ti both ways but none of the links i want to come up show.. its just empty

Re: how to add incldues into header and ipp side bar [Re: square_peg] #285602 06/22/2005 5:02 PM
Joined: Oct 2003
Posts: 2,305
scroungr Offline
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
whats in pull.php?

try doing something like at the top of pull.php print_r("WIDGET");

and see if you see anything.. then also look at your error files and see if they provide clues

Sponsored Links
Re: how to add incldues into header and ipp side bar [Re: 234234] #285603 06/22/2005 6:10 PM
Joined: Aug 2004
Posts: 82
minto Offline OP
Power User
OP Offline
Power User
Joined: Aug 2004
Posts: 82
Code
 <?<br />// Variables Section - Edit these to suit your needs<br />// Number of threads to show<br />$numposts =	8;<br /><br />//number of characters of the subject to display<br />$numchars = 25;<br /><br />// -----------------------------<br />// End of the variables section<br /><br />require_once ("./includes/main.inc.php");<br />// --------------------------<br />// Let's grab the  threads<br />$query = "<br />	SELECT B_Number, B_Subject<br />	FROM {$config['tbprefix']}Posts<br />	WHERE B_Parent = '0'<br />        AND B_Board = 'site' <br />	ORDER  BY B_Posted DESC<br />	LIMIT $numposts<br />";<br />$sth = $dbh -> do_query($query);   <br /><br />// -----------------------<br />// Cycle through the posts<br />while ( list($Number,$Subject) = $dbh -> fetch_array($sth)) {<br />	$Subject =substr($Subject,0,$numchars) . "...";<br />	$toprint .= "ยท <a href=\"{$config['phpurl']}/showflat.php/Number/$Number\">$Subject</a><br \>";<br />}<br />$dbh -> finish_sth($sth);<br />echo $toprint;<br />?><br />


thats whats in the pull.php

Re: how to add incldues into header and ipp side bar [Re: square_peg] #285604 06/22/2005 6:16 PM
Joined: Aug 2004
Posts: 82
minto Offline OP
Power User
OP Offline
Power User
Joined: Aug 2004
Posts: 82
because i am doing it in the admin panle. with ubbt_registednav.tmpl

so am i editing in the wrong spot?


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
jgeoff
jgeoff
NJ
Posts: 96
Joined: April 2001
Forum Statistics
Forums63
Topics37,490
Posts293,665
Members13,828
Most Online5,166
Sep 15th, 2019
Top Posters(All Time)
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,786
Greg Hard 4,625
Top Posters(30 Days)
isaac 12
Gizmo 1
Today's Statistics
Currently Online 960
Topics Created 0
Posts Made 1
Users Online 1
Birthdays 15
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191013.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.045s Queries: 15 (0.015s) Memory: 3.2407 MB (Peak: 3.4392 MB) Data Comp: Zlib Server Time: 2019-10-17 20:09:33 UTC
Valid HTML 5 and Valid CSS