![]() |
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?
|
|
K thanks but what if I want to show only 3,4 thread on the lastest thread, not 15 of them, how do i reduce the number of thread shown?
|
edit this line
PHP Code:
PHP Code:
|
thank you, princton, it works liek a champ, now the problem is, what if i want to change the font and style on that custom thread page, cause it use the forum css and it is bigger than my custom page font and size, is there a way?
|
Nvm, i got this.
|
Im looking to use something like this but instead of threads I would like to list members in order of the highest number in a custom profile field....I run a trading site and each time a member makes a trade we add 1 point to a custom profile field...I want to start from highest to lowest and list the member and how many trades they have. Would this work and if so what would I need to change?
|
Quote:
You will need to create the function and queries to do this ... once you have that you can add it to the GTCUSTOM PAGE product. |
Thanks!
Could you help me to add a column with the forum name where the threads belongs? |
How do I have the hot topic thread to show or most active usersname instead of recent threads?
|
I have a "back room" on my pet forum where we discuss board/moderator issues. This will show those threads? Is there anyway to eliminate that?
|
you will have to edit the script to fetch rows based on permissions
|
Any method to show threads from x to y and for a specific forum?
i.e for an hypothetical "test forum" show threads from 1 to 50 and so on. Thanks a lot. |
you can query the specific forum ...
Code:
WHERE thread.visible = 1 AND thread.forumid = 50 |
Sorry to bump this old article, but this is a perfect find. I will look into this more..
|
Hi
Very good hack.But how can I add lastest 5 thread under similar thead? Thank you :) |
Hey Princeton!
I know you wrote this like 5 years ago so i know its a longshot anyway but im hoping you will reply :) Basically im wondering if you know of a way i could create forums for my custom page page area which im currently using for clans. I've worked out the custom page part, now i just want to give clans hosted on the site their own forums integrated with that page. Ideally on the right side i want to use something like $displayclanfourmX and the forum just gets displayed and the layout is retained. Sounds overly simplistic in idea, is that possible? haha Let me know! Thanks :) |
I was looking for that thanks :)
|
1 Attachment(s)
didn't seem icons. :(
|
All times are GMT. The time now is 02:38 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|