The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Create "Latest Threads" Custom Page
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%"> <tbody> <tr> <td class="tcat" colspan="5"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('gtcthreads')"><img id="collapseimg_gtcthreads" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_gtcthreads].gif" alt="" border="0" /></a>$vbphrase[header_title]</td> </tr> <tr class="thead"> <td> </td> <td class="smallfont" align="$stylevar[left]" width="100%">$vbphrase[thread] / $vbphrase[thread_starter]</td> <td class="smallfont" align="center" style="white-space:nowrap">$vbphrase[last_post]</td> <td class="smallfont" align="center">$vbphrase[replies]</td> <td class="smallfont" align="center">$vbphrase[views]</td> </tr> </tbody> <tbody id="collapseobj_gtcthreads" style="$vbcollapse[collapseobj_gtcthreads]"> $threadrows </tbody> </table> <br /> HTML Code:
<tr> <td class="alt2" align="center"><if condition="$show['threadicon']"><img class="inlineimg" src="$thread[iconpath]" alt="" border="0" title="" /> <else /> </if></td> <td class="alt1"><a href="showthread.php?t=$thread[threadid]"><strong>$thread[title]</strong></a> <div class="smallfont"> - by $thread[postusername]</div></td> <td class="alt2" align="center"><div class="smallfont time" style="white-space:nowrap">$thread[lastpostdate] $thread[lastposttime]<br />by $thread[lastposter]</div></td> <td class="alt1" align="center">$thread[replycount]</td> <td class="alt2" align="center">$thread[views]</td> </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:
|
#2
|
|||
|
|||
nice work
thanks |
#3
|
||||
|
||||
thanks for the feedback :up:
|
#4
|
|||
|
|||
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 |
#5
|
||||
|
||||
try xml/rss/javascript syndication:
http://www.vbulletin.com/docs/html/v...group_external |
#6
|
|||
|
|||
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. |
#7
|
||||
|
||||
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" |
#8
|
|||
|
|||
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 |
#9
|
|||
|
|||
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?
|
#10
|
||||
|
||||
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|