vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   SIMILARTHREADS in SHOWTHREAD_SHOWPOST (https://vborg.vbsupport.ru/showthread.php?t=185821)

imported_silkroad 07-20-2008 08:08 AM

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!

Dismounted 07-20-2008 10:24 AM

You need to make sure the variable exists when that template is called.

imported_silkroad 07-20-2008 11:24 AM

Quote:

Originally Posted by Dismounted (Post 1579700)
You need to make sure the variable exists when that template is called.

How do we do it for this simple question?

Thanks.

Dismounted 07-20-2008 12:05 PM

Look in the file where the template is eval()'d, then find where $similarthreads is "created".

imported_silkroad 07-20-2008 12:13 PM

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.

Dismounted 07-20-2008 12:48 PM

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.

imported_silkroad 07-20-2008 01:04 PM

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.

Digital Jedi 07-20-2008 01:20 PM

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.

imported_silkroad 07-20-2008 02:00 PM

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??

Digital Jedi 07-20-2008 03:16 PM

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.


All times are GMT. The time now is 01:22 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
  • Page Generation 0.01132 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete