Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Create "Latest Threads" Custom Page
Princeton
Join Date: Nov 2001
Posts: 6,693

Joe Velez began developing for the web in 1998. He is an avid vBulletin user and volunteers his services as a vbulletin.org administrator. He currently spends his time maintaining and developing allnurses.com.

Vineland, NJ
by Princeton Princeton is offline 23 Feb 2006

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
  2. add 1 phrase
  3. add function to functions_gtcustom.php
  4. edit goto.php
  5. visit page at $vboptions[bburl]/goto.php?section=newthreads

1)__ CREATE 2 TEMPLATES
Create "custom_thread" template:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Create "custom_threadrow" template:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2)__ CREATE 1 PHRASE
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)
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

4)__ EDIT goto.php
FIND IN goto.php:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE WITH:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

FIND:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE WITH:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

5)__ DONE!
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:
  1. All html code is valid XHTML.
  2. This query will display all thread titles regardless of permission settings.
Attached Images
File Type: jpg newthreads.jpg (38.1 KB, 2016 views)
Attached Files
File Type: txt latest_threads_function-1.txt (5.7 KB, 151 views)

Last edited by Princeton; 03 Mar 2006 at 02:23..
Views: 24978
Reply With Quote
Comments
  #2  
Old 23 Feb 2006, 23:51
hiiped's Avatar
hiiped hiiped is offline
 
Join Date: Jan 2006
nice work

thanks
Reply With Quote
  #3  
Old 24 Feb 2006, 01:26
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
thanks for the feedback
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #4  
Old 27 Feb 2006, 19:07
Clayton's Avatar
Clayton Clayton is offline
 
Join Date: Nov 2004
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
Reply With Quote
  #5  
Old 27 Feb 2006, 22:31
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
try xml/rss/javascript syndication:
http://www.vbulletin.com/docs/html/v...group_external
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #6  
Old 02 Mar 2006, 23:18
justindwhite justindwhite is offline
 
Join Date: Apr 2005
Real name: Justin
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.

Last edited by justindwhite; 03 Mar 2006 at 00:32. Reason: Automerged Doublepost
Reply With Quote
  #7  
Old 03 Mar 2006, 02:27
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
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.
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #8  
Old 03 Mar 2006, 07:13
Clayton's Avatar
Clayton Clayton is offline
 
Join Date: Nov 2004
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
Reply With Quote
  #9  
Old 14 Mar 2006, 22:24
theguywhoknowz theguywhoknowz is offline
 
Join Date: Feb 2006
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?

Last edited by theguywhoknowz; 14 Mar 2006 at 22:57.
Reply With Quote
  #10  
Old 15 Mar 2006, 12:57
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
try fetch_word_wrapped_string($title, $limit)
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #11  
Old 17 Mar 2006, 23:11
theguywhoknowz theguywhoknowz is offline
 
Join Date: Feb 2006
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?
Reply With Quote
  #12  
Old 18 Mar 2006, 15:19
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
edit this line

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #13  
Old 20 Mar 2006, 17:17
theguywhoknowz theguywhoknowz is offline
 
Join Date: Feb 2006
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?
Reply With Quote
  #14  
Old 21 Mar 2006, 21:13
theguywhoknowz theguywhoknowz is offline
 
Join Date: Feb 2006
Nvm, i got this.
Reply With Quote
  #15  
Old 26 Mar 2006, 15:38
ChrisBaktis ChrisBaktis is offline
 
Join Date: Mar 2004
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?
__________________
www.rustysoaptraders.com
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 13:41.

Layout Options | Width: Wide Color: