Create "Latest Threads" Custom Page
1 Attachment(s)
A simple [HOWTO] to display latest threads on a custom page.
If you don't have GTCUSTOM PAGES installed .. go download and upload product via Plugin Manager. You need GTCUSTOM PAGES to follow this article. LETS GET STARTED INSTRUCTIONS:
1)__ CREATE 2 TEMPLATES Create "custom_thread" template: HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> HTML Code:
<tr> Phrase Type: GTCustom Pages Product: GTCustom Pages Varname: gtcustom_newthreads_header Text: Latest Threads 3)__ ADD FUNCTION TO functions_gtcustom.php Copy the following function to functions_gtcustom.php (functions_gtcustom.php is included in GTCUSTOM PAGES product) PHP Code:
FIND IN goto.php: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Now, go visit the page that you just created: $vboptions[bburl]/goto.php?section=newthreads Need any help? Contact me personally via private message. NOTE:
|
nice work
thanks |
thanks for the feedback :up:
|
hi princeton
some great work going on here i would like to the latest threads from one website[domain] and display it on another domain, would it be possible to do it with this hack, please? thank you C |
try xml/rss/javascript syndication:
http://www.vbulletin.com/docs/html/v...group_external |
Whats the best way to put the:
"$vboptions[bburl]/goto.php?section=newthreads" on your non vb page? I've tried using iframe as you can see on http://www.h2survivor.com, but when you click on a link it loads in the iframe. Anyone know a better way to do this or fix the iframe problem? Also, I notice on the preview image that all the posts say 7:00PM. On my site, it also has every post as being posted at 7:00PM. I can't seem to figure this out on my own. |
I made some changes..
IN gtcustom_threadrow replace $thread[lastpost] with $thread[lastpostdate] in the print_gtcustom_newthreads() replace $thread['lastpost'] = vbdate($vbulletin->options['dateformat'], $thread['lastpost'], 1); with $thread['lastpostdate'] = vbdate($vbulletin->options['dateformat'], $thread['lastpost'], 1); regarding the iframe ... add a target attribute to your link ie. HTML Code:
target="new" |
thanks princeton
will wait a little longer to see the different changes and then attempt to create the page with the forum threads on Thank you C |
Ok so i was sucessful add the latest thread into a custom php page, but i resize the table, and the thread title is too long, it wrap down, is there a way that it only show the first 10 characters and the rest is "..." without wraping the text to the next line?
|
|
All times are GMT. The time now is 01:40 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|