PDA

View Full Version : Integration with vBulletin - Recent Topics on Non-VB Pages


LBmtb
09-08-2008, 10:00 PM
RECENT TOPICS by LBmtb
Version 2.0
Last updated: September 9th, 2008

DESCRIPTION
This script will display the topics with the most recent posts on a non-vb page (any HTML page). The page it's on must have a .php extension or you should setup apache to parse the page correctly. The threads with the latest posts are on top. You may output the recent topics in table format, list format, or retrieve an array of the topics for custom output. Installing this script assumes basic PHP knowledge. PHP5 is required. This is an updated version of this mod: https://vborg.vbsupport.ru/showthread.php?p=1141334

COPYRIGHT
I am releasing this script on the condition that you do not remove the copyrights from the code. You may not modify and redistribute the code without written permission. Thanks in advance for understanding.

NEED CUSTOMIZATION OR PROFESSIONAL INSTALLATION?
Email me at webmaster@socaltrailriders.org, PM me on vbulletin.org, or aim me at "LBmtb" to inquire about customizing this script or for installation.

REVISION HISTORY
Version 2.00: Complete code rewrite (OOP). Preview of first post removed for performance. Made it possible for multiple recent topic blocks to be added to a page.
Version 1.03: Adds small preview of first post when the user rolls over the links
Version 1.02: option to exclude certain forums
Version 1.01: option to only include certain forums
Version 1.0: Initial Release

INSTRUCTIONS:
1) Unpack the files into it's own directory. Make sure that recent_topics.class.php, config.php, and register.class.php stay in the same directory now and after you upload to your web server.
2) Go into config.php and modify the values for your forum URL and the database connection.
3) Go into usage.php to see examples and instructions on the usage of Recent Topics. If you use Recent Topics in a different directory, make sure to adjust the 'require_once('recent_topics.class.php');' line to reflect that change.
4) Mark as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=190425)
5) Donate (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=webmaster%40socaltrailriders%2eorg&item_name=vb%20Mod&item_number=Recent%20Topics%20Script&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8) (optional)

DEMO:
http://www.socaltrailriders.org/recentTopics/usage.php

DONATIONS
Having recent topics on the rest of your website is a great way to show what's currently going on in your forum. I tried to make the process of adding this functionality as easy on you as I could. If you like what this brings to your website, please consider making a donation. It would be much appreciated. My paypal email is: webmaster@socaltrailriders.org

LBmtb
09-09-2008, 07:56 AM
Reserved.

nader
09-09-2008, 10:27 AM
syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}

LBmtb
09-09-2008, 01:38 PM
syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}
I just downloaded the zip file and rechecked the files and they seem okay. What file does it say the error is on and what line? Feel free to PM me the full error and copy/paste that line plus the line before it and I can tell you where the error is.

Oh . . . I also forgot to mention that this requires PHP5. If there's enough demand I can make a PHP4 version.

legionofangels
09-09-2008, 05:21 PM
Will this release work along the same lines as the vbSEO version you have previous?

We have vbSEO installed and was just wondering if this works the same way, aside from the upgrades and changes to code you made?

We currently have PHP 4.4.9 as well, I don't know if we can upgrade or not to 5. I'll have to ask.

LBmtb
09-09-2008, 05:27 PM
Will this release work along the same lines as the vbSEO version you have previous?

We have vbSEO installed and was just wondering if this works the same way, aside from the upgrades and changes to code you made?

We currently have PHP 4.4.9 as well, I don't know if we can upgrade or not to 5. I'll have to ask.
I'm planning on releasing a vbSEO version of this update really soon. It's not hard to make this PHP4 compatible. Maybe I'll crank out a PHP4 version of this today or tomorrow.

legionofangels
09-09-2008, 05:37 PM
Does it work with other versions of vb, 3.5, 3.6, etc?

I suppose it's irrelevant if you think about it, since the code is working on a non-vb page but I thought I'd ask.

nic_net
09-10-2008, 06:35 AM
I'm planning on releasing a vbSEO version of this update really soon. It's not hard to make this PHP4 compatible. Maybe I'll crank out a PHP4 version of this today or tomorrow.

All the people who uses Cpanel has PHP4. Please, release a PHP4 compatible version.

Thanks!

legionofangels
09-15-2008, 03:48 PM
Sent you a pm about the vbSEO version, let me know please when you have a chance.

nic_net
09-18-2008, 02:11 PM
I'm planning on releasing a vbSEO version of this update really soon. It's not hard to make this PHP4 compatible. Maybe I'll crank out a PHP4 version of this today or tomorrow.

I am waiting with great excitement the PHP 4 version :P

Thanks!

legionofangels
09-26-2008, 12:56 PM
We upgraded to php 5 and used your code multiple times. We would have preferred the vBSEO option but you apparently haven't coded that yet and you didn't answer my pm, so that's cool.

You can also use multiple images with this as we've done on our own site, it requires changing the word "topics" in every copied file set of this code to whatever the multiple use is.

So we named them, news, videos, religion, etc. So that it would pull the image from a different file and allow multiple imagery with this, which is something we added to as your product didn't come standard with that. If people would like to see an example of the code to do this, let me know.

Shown here in application:

http://www.legionofangels.net

maidos
09-27-2008, 03:48 PM
thanks alot

maidos
09-27-2008, 10:42 PM
can you select latest thread in a specific forum section id?

legionofangels
10-02-2008, 08:45 PM
can you select latest thread in a specific forum section id?

Yes, that is within his code. Exclude or Include certain forums based upon ID's.

star88
10-06-2008, 04:09 PM
thank you very much for your work

kud0gfx
10-24-2008, 09:54 AM
how can i get the variables thread_starter

and thread_start_time

Thank you very much, if i get to make it rule properly, i will donate for sure!

and, could it only show the new threads? like the rss, not the new posts, i dont know if im explaining myself...

too expecting vbSEO compatible ^^

CorneliusW
10-29-2008, 12:21 AM
I just downloaded the zip file and rechecked the files and they seem okay. What file does it say the error is on and what line? Feel free to PM me the full error and copy/paste that line plus the line before it and I can tell you where the error is.

Oh . . . I also forgot to mention that this requires PHP5. If there's enough demand I can make a PHP4 version.

I am running PHP 5 and I receive the same error on main page of website. I have the script files in the home directory so that its with my index.php. Here's the full error:


Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/prowr7/public_html/mmaing/recent_topics.class.php on line 32

Tomzl
11-15-2008, 06:44 PM
My forum uses UTF-8 and I am getting strange characters using this script. Is this script UTF-8 compatible?

Wsh
11-15-2008, 07:11 PM
can this show the actual thread content itself as well? or just the titles

JohorBahru
02-16-2009, 03:02 PM
may i know how to edit the text size and number of characters?
thank you :D

varkjie
07-10-2009, 02:05 AM
Yes, that is within his code. Exclude or Include certain forums based upon ID's.


I have it set to only include certain areas of my forum one for one are and one for another and they both seem to be pulling up ALL new posts.... even posts in a secret are of my forum..... how can I fix this?
http://www.coupontradercentral.com/8.php
and
http://www.coupontradercentral.com/7.php

thanks

chrisbr
08-31-2009, 05:18 PM
This is great, does exactly what it says on the tin.

A slight niggling issue is the lack of styling. - Can you help me make it look like a forum post per each record it brings from the DB?

oedipean
12-26-2010, 08:48 PM
Does this hack work on Vb 4 ? or something similar?