vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Passing threadid properly in template hack (https://vborg.vbsupport.ru/showthread.php?t=34732)

jacy 02-02-2002 05:10 PM

I posted this on vbulletin.com in the Templates forum but I'm wondering if it's veering to closely toward a hack, so I'm trying here, too. Sorry for any double effort.

I've modified my thread options links (print, email and subscribe, with their images) to be part of my forumrules template. Looks the way I want, but I can't get the threadid to pass into the link properly.

I've tried adding an eval to function.php, including the forumrules template in templatesused in showthread.php, and so on. Nothing seems to get it to work. I'm sure I'm missing something rather obvious and simple but can't get at it.

Here's an example of how I would like it formatted. The thread options are in a third TD tag in the forumrules table at the bottom:
http://asthmatrack.org/forums/showth...?threadid=1358

Click one of the thread options and you'll get the 'no thread id' error message. My forumrules template is as follows:

<table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E"><tr><td>
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td bgcolor="#13486D"><smallfont>
You <b>may $rules[postnew]</b> post new threads.<br>
You <b>may $rules[postreply]</b> post replies.<br>
You <b>may $rules[attachment]</b> post attachments.<br>
You <b>may $rules[edit]</b> edit your posts.
</smallfont></td>
<td bgcolor="#13486D"><smallfont>
<a href="misc.php?s=$session[sessionhash]&action=bbcode" target="_blank">vB code</a> is <b>$bbcodeon</b><br>
<a href="misc.php?s=$session[sessionhash]&action=showsmilies" target="_blank">Smilies</a> are <b>$smilieson</b><br>
<a href="misc.php?s=$session[sessionhash]&action=bbcode#imgcode" target="_blank">[IMG]</a> code is <b>$imgcodeon</b>
</smallfont></td><td bgcolor="#13486D"><smallfont><img src="https://vborg.vbsupport.ru/images/printer.gif" alt="" border="0" align="absmiddle">
<a href="printthread.php?s=$session[sessionhash]&threadid=$threadid">Show Printable Version</a><br><img src="https://vborg.vbsupport.ru/images/sendtofriend.gif" alt="" border="0" align="absmiddle">
<a href="sendtofriend.php?s=$session[sessionhash]&threadid=$threadid">Email this Page</a><br><img src="https://vborg.vbsupport.ru/images/subscribe.gif" alt="" border="0" align="absmiddle">
<a href="member2.php?s=$session[sessionhash]&action=addsubscription&threadid=$threadid">Subscr ibe to this Thread</a>
</smallfont>
</td></tr>
</table>
</td></tr></table>


Thanks for any help! I bought vBulletin almost 2 years ago but gave up getting it running out of frustration and ignorance. Finally went at it again last night after learning of the vServers issues (my server) and got it up and running and my old board imported in a matter of a couple hours. Now if I can just get these little AR aesthetic details worked out... ;)

~Jacy

Admin 02-03-2002 12:53 PM

You need to globalize $threadid in the getforumrules() function:
Code:

function getforumrules($foruminfo,$permissions) {
  // array of foruminfo and permissions for this forum
  global $offtext,$ontext,$forumrules,$session[high],$threadid[/high];

(what you need to add is highlighted)

jacy 02-03-2002 06:57 PM

That did the trick, Chen. Knew it had to be something very simple but crucial. Thanks so much for the reply!

~Jacy

Admin 02-04-2002 01:04 PM

No probs. :)


All times are GMT. The time now is 07:48 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.00923 seconds
  • Memory Usage 1,729KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete