Previous Thread
Next Thread
Print Thread
Rate Thread
#212978 11/21/2001 8:47 AM
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
If you've wondered which of the addon scripts is driving the Latest Threads section on this site's home page, let me share it with you! I modified the topthreads.php script into latestthreads.php.

It can be found here! Again, if you find any bugs/issues/concerns, please let me know!

Thanks!
Attachments
43365-latestthreads.php (0 Bytes, 69 downloads)

Last edited by AllenAyres; 11/22/2001 9:48 AM.

--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks again Matt, it works well. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Fatal error: Failed opening required '/home/httpd/html/wwwthreads.com/php/main.inc.php' (include_path='.:/usr/local/lib/php') in /home/htdocs/vhosts/ubbdev.com/htdocs/threads/php/uploads/43365-latestthreads.php on line 66



- Custom Web Development
http://www.JCSWebDev.com
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
JC,

are you running this on a page that has other addon scripts...? If so, comment out the line that includes main.inc.php / ubbt.inc.php and let me know if that works...


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
clicked your attachment link and got that. smile


- Custom Web Development
http://www.JCSWebDev.com
Sponsored Links
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
I see what you mean! Allen, any idea what's up with that?


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Oh, didn't know you attached it the same in the public forums []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

You attached a .php file, which is gonna try to run instead of download when someone clicks on it.

I just changed the extension to .txt :
click here - I am not sure if you can go back and edit your attachment to the new link.


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
nope, the max time has been exceeded.... []https://www.ubbdev.com/threads/php/images/icons/frown.gif[/] ah well... lesson learned!! Thanks for posting the link to the .txt file... if you can edit my post, you can just remove the attachment altogether and place the same link in the post... []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

thanks allen!


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Nov 2001
Posts: 52
Power User
Power User
Offline
Joined: Nov 2001
Posts: 52
Bug Report ...

It looks like the latestthreads.php does not look where he is allowed to grab messages from and just goes through all the forums.

So it shows messages from private boards that are only accesible by moderators and administrators. (Which is ofcourse not the intention for a main guest page)

A quick and dirty fix is

// --------------------------
// Let's grab the news items
$query = "
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board, Bo_Read_Perm
FROM w3t_Posts, w3t_Boards
WHERE BO_Keyword = B_Board
AND Bo_Read_Perm = '-1-2-3-4-'
AND $qual
AND B_Last_Post > '$date'
ORDER BY $sort DESC
LIMIT $totalthreads
";

$sth = $dbh -> do_query($query);

// ---------------------------

but probably it can be optimized.

But I would be like to be able to strip out all the images (so the HTML code) ... anyone knows a quick way to do this?


Greetz

Boris

Last edited by boris; 11/24/2001 8:37 AM.
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
If you find :
AND B_Last_Post > '$date'

and add underneath :
AND B_Board <> 'keyword'

Where "keyword" is the keyword for your private forum, it does pretty much the same thing, tho it's not automagic like yours might be.


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Nov 2001
Posts: 52
Power User
Power User
Offline
Joined: Nov 2001
Posts: 52
Hey Allen,

It is automagic :)

However to be completly on the good spot ...

AND Bo_Read_Perm like '%-3-4-%'

instead of equals ... now all forums were guests and registered normal members have access to are listed. Whenever you change the permissions of a forum you don't need to worry about the addon ... it follows.

A second small bug is the sort order when using full posts.

If you change it to

$sort = "B_Posted";

instead of B_Last_Post the output is correct, because B_Last_Post is changed for all posts of a thread when a post is added ...

Greetz

Boris

Joined: Nov 2001
Posts: 52
Power User
Power User
Offline
Joined: Nov 2001
Posts: 52
I changed a few smaller things
It's inspired on the good old UBB includes we had ...


In this version.

HTML is automaticly striped out in the body.
-this caused problems if body was X characters and last charcter was in the middle of HTML code.
-no huge images showing up on your include page and thus ruining your design

LANG file added.
- language used in the code is replaced by variables

READ THREAD
- added link for full thread even if "all" is selected.

USER INFO
- added link to userinfo

REACT NOW
- added a REPLY NOW so you can direct reply on a thread.

FORUMS SELECTED on READ PERMISSIONS
- added a function so you can select wich forums are used based on the read access for the User Groups you have.


http://www.ukkepuk.net/ubbt/latestthreads.txt
www.ukkepuk.net/ubbt/languagefile_latestthreads.txt

Last one should be renamed and placed in the language directory.

Greetz

Boris



Last edited by boris; 11/25/2001 3:12 AM.
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
thanks for fixing it up, boris! I just did a quick kludge to get what I needed... but your refinements make it so much better!

good work!


--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
i cant open any of these links to the code ;O((

Please repost it , i need it bad ;O)

Thomas

Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
Please can someone send me the addon... i neeeed it

[][email protected][/]

or in post here

Joined: Nov 2001
Posts: 126
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 126
Hey, Id love the newest version of this too please..!

-Bry

Joined: May 1999
Posts: 241
Coder
Coder
Offline
Joined: May 1999
Posts: 241
to be honest, my site died, and I'm in the process of rebuilding it... Allen might have the latest and greatest version... (I hope!! []/forum/images/icons/wink.gif[/])

Sorry!

Last edited by MattyJ; 03/08/2002 9:32 AM.

--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I have an older one, I'll post it as soon as I get to work today, right now I have some major plumbing problems at my house []/forum/images/icons/tongue.gif[/]


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
Just dave made this for me, works great, i see just daveĀ“s link doesent work anymore so you can download it here :
http://www.4701.dk/44957-5_5-currentposts-2_0_php.zip


Thomas


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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 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)