Previous Thread
Next Thread
Print Thread
Rate Thread
#285455 05/31/2005 12:48 AM
Joined: Aug 2004
Posts: 82
Power User
Power User
Offline
Joined: Aug 2004
Posts: 82
hey guys i am using contentislands for some thread pulling but i cant format it how i want it to be.

what im after is for some category's to pull the posts. no user name or post time just the title and limited the title to say 16 characters.

a example is here
Attachments
128101-untitled.jpg (0 Bytes, 15 downloads)

Sponsored Links
Joined: Aug 2004
Posts: 82
Power User
Power User
Offline
Joined: Aug 2004
Posts: 82
nobody ever done this before?

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
For sure.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Very possible, but through content islands it is a royal pain.

If you are needing the info on the same site that holds your threads install, a quickie php script is better for this.

Joined: Aug 2004
Posts: 82
Power User
Power User
Offline
Joined: Aug 2004
Posts: 82
any ideas where to get a script or any way going about it?

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Code
 <br /><?<br />// Variables Section - Edit these to suit your needs<br />// Number of threads to show<br />$numposts =	10;<br /><br />//number of characters of the subject to display<br />$numchars = 40;<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 />	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 />

Joined: Aug 2004
Posts: 82
Power User
Power User
Offline
Joined: Aug 2004
Posts: 82
awsome man awsome...

but it dont work. i get a access denied error..

as i need url's like http://www.uproar1.com/ubbthreads/showflat.php?Number=282

not like it out puts to http://www.uproar1.com/ubbthreads/showflat.php/Number/359

as they bioth work if i use lower number/100 sya that will work bt for some reason it pulls higher #numebrs than posts.


can be found here http://www.uproar1.com/ubbthreads/pull.php

Last edited by minto; 06/02/2005 5:44 PM.
Joined: Aug 2004
Posts: 82
Power User
Power User
Offline
Joined: Aug 2004
Posts: 82
argh its pulling shotbox posts as well lol

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
If you want some forums excluded, then you have to add
AND B_Board != 'forumkeyword'

for each forum after
WHERE B_Parent = '0'

If you need the urls formated differently, just edit
showflat.php/Number/$Number
into
showflat.php?Number=$Number

Joined: Aug 2004
Posts: 82
Power User
Power User
Offline
Joined: Aug 2004
Posts: 82
if i just wanted one forum how would i got about that?

Sponsored Links
Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
[]minto said:
if i just wanted one forum how would i got about that? [/]

AND B_Board = 'forumkeyword'

Joined: Aug 2004
Posts: 82
Power User
Power User
Offline
Joined: Aug 2004
Posts: 82
ok i dont get it. what line do i have to replace with AND B_Board = 'news' or where do i add it to only take from that forum?

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
The SQL queries are can be read just like a natuaral language sentence.

Read aloud:

SELECT B_Number, B_Subject
FROM {$config['tbprefix']}Posts
WHERE B_Parent = '0'
AND B_Board = 'forumkeyword'
ORDER BY B_Posted DESC
LIMIT $numposts


Link Copied to Clipboard
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
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)