Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2008, 08:08 AM
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Posts: 563
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default SIMILARTHREADS in SHOWTHREAD_SHOWPOST

How do I get SIMILARTHREADS to work in SHOWTHREAD_SHOWPOST ?

I tried to simply put $similarthreads in the SHOWTHREAD_SHOWPOST but it did not work.

Thanks so much!
Reply With Quote
  #2  
Old 07-20-2008, 10:24 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to make sure the variable exists when that template is called.
Reply With Quote
  #3  
Old 07-20-2008, 11:24 AM
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Posts: 563
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
You need to make sure the variable exists when that template is called.
How do we do it for this simple question?

Thanks.
Reply With Quote
  #4  
Old 07-20-2008, 12:05 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look in the file where the template is eval()'d, then find where $similarthreads is "created".
Reply With Quote
  #5  
Old 07-20-2008, 12:13 PM
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Posts: 563
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Dismounted,

This seems to be a very straighforward question, but you are just treating the answer like you really do not want to help, just posting one line answers at a time.

If you can't fully explain how to do it, kindly let someone post a reply who does not mind to take a few minutes to explain propertly.

If you know how to really do it, please simply provide the step-by-step details.

Thanks.
Reply With Quote
  #6  
Old 07-20-2008, 12:48 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You see, what I try to do is provide clues and guidance - it is much better if you can get someone to do something themselves, they usually go "wow, that was much easier than I expected". In addition, they learn and they know what to do in the future.

I will leave this thread now, for someone else to answer, as you have made it plain and clear you want a "just give me the answer" post.
Reply With Quote
  #7  
Old 07-20-2008, 01:04 PM
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Posts: 563
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that is what we need, thanks.

Cryptic clues might be a fun game for some, but since we are really busy, all concerned would benefit from a basic, three line explaination of the details, so we (and others who might read in the future) can move on to the next topics.

Thanks for the clues, but this is such a very simple and basic concept, the community would benefit if there was just a straight forward explaination and real world example (like this one) so we can do it and move on.

Can someplease provides the basic steps to take a working template in SHOWTHEAD, $similarthread, and get it to work in SHOWTHREAD_SHOWPOST, in a straight forward, easy to understand way?

Thank you.
Reply With Quote
  #8  
Old 07-20-2008, 01:20 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's because the answer is only one line. You know, I had no idea what he was talking about either (don't let the "coder" nonsense in my user title fool you), but a quick Google search for eval() explained it to me. Look for the file where $similarthreads variable is and the template name is beside that. I don't know what you do with it from there, but at least, try and find it. My wild undeducated guess is you just add the template name in beside it.
Reply With Quote
  #9  
Old 07-20-2008, 02:00 PM
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Posts: 563
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Jedi,

No, it is not just a one liner, I don't think. That is the problem sometimes here, folks could take the time, to teach if they really knew, but we just waste a lot of time because the documentation and tutorials are so poor.

ANYWAY (LOL)

In showthread.php there are only two eval statements associated with similarthread and both look like this:

Code:
eval('$similarthreads = "' . fetch_template('showthread_similarthreads') . '";');
I don't think it is obvious from this eval() statement how to get the template to work in the showthread_showpost template.

If this is so easy, why can't we just get a step-by-step reply?

There must be many tempates in vB that are used in one temlpate that can be used in another, and this question somes up time and time again, but I can't get a straight forward answer for months.

It's like "dud" it is so easy, but we are going to make you feel like an idiot for asking. What is up with that??
Reply With Quote
  #10  
Old 07-20-2008, 03:16 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No one suggested it was easy or that you were stupid for not knowing. I even said, I don't know. But, well, I mean, if you think about it, if it wasn't something you found in a search, that means it's not really been done before. If it's not been done before, then how can you get step-by-step directions? And if it's not been done before, then the best anyone can do is point in the right direction through an educated guess. The way you phrase it, you sound like your asking for it to be done for you. For most problems, it's a matter of you working it out, and coming back with your results if it doesn't work. That's the way most of us here sort out issues when trying something new.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 02:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04181 seconds
  • Memory Usage 2,246KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete