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
 &lt;?<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 -&gt; do_query($query);   <br /><br />// -----------------------<br />// Cycle through the posts<br />while ( list($Number,$Subject) = $dbh -&gt; fetch_array($sth)) {<br />	$Subject =substr($Subject,0,$numchars) . "...";<br />	$toprint .= "ยท &lt;a href=\"{$config['phpurl']}/showflat.php/Number/$Number\"&gt;$Subject&lt;/a&gt;&lt;br \&gt;";<br />}<br />$dbh -&gt; finish_sth($sth);<br />echo $toprint;<br />?&gt;<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
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
drkknght
drkknght
rob's pad -- where it takes skin, to win!
Posts: 1,271
Joined: November 2000
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,499
Posts293,666
Members13,824
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 21,084
JoshPet 10,370
LK 7,395
Lord Dexter 6,709
Gizmo 5,786
Greg Hard 4,625
Top Posters(30 Days)
isaac 26
driv 16
Gizmo 5
Morgan 2
Today's Statistics
Currently Online 928
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 16
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.3
(Snapshot build 20190709.dev)
PHP: 5.4.45 Page Time: 0.041s Queries: 15 (0.010s) Memory: 3.2523 MB (Peak: 3.4462 MB) Data Comp: Zlib Server Time: 2019-07-16 10:04:53 UTC
Valid HTML 5 and Valid CSS