The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Define new variable for showthread.php
Hi guys,
I am wanting to define a new variable for use on showthread.php page ... The variable is based on a previously defined variable from Psionic Vision's Hide Hack Resurrection - here The variable $message is already defined & outputted on showthread.php I simply want to use $message to define a new variable like this Code:
$message2 = base64_encode($message); I have already asked on the support thread but Psionic has told me he doesn't support custom modifications ... cmon guys, it ain't that difficult! I should say that there is a super useful & important mod waiting to be released that relies on this new variable.... Many thanks in advance |
#2
|
|||
|
|||
Have you tried including it in a plugin using one of the showthread hooks?
|
#3
|
|||
|
|||
ummm ......... please explain how I'd do this? Haven't really got my head round vbulletin structure yet....
ps. Thanks for the quick reply |
#4
|
||||
|
||||
You would create a plugin using a template_hook that takes $message and changes it how you want. I'm guessing that you would want to use one of hte postbit_ hooks (postbit_display_complete?)since $message is a postbit variable. So, you'd want something like:
PHP Code:
|
#5
|
|||
|
|||
Aggghh I'm still lost. I've tried understanding it via this post but I still can't get my damn head around it!
Lynne, do you know of any users on here I could contact to format my code into a mod (paid or unpaid)?? |
#6
|
||||
|
||||
This will help you more - Adding or Editing a Plugin Try following that to create a plugin.
|
#7
|
|||
|
|||
I've created a new plugin
Product - vs hide Hack Resurrection Hook Location - postbit_display_complete Code - Code:
$this->post['message2'] = "test-text"; echo $message2; I've also tried without the echo - just $message2 & also tried echo'ing $message2 from postbit template ... Nothing so far ... what the heck am I doing wrong?? |
#8
|
||||
|
||||
you don't want to echo anything. Remove the echo and then put $message2 in your postbit.
|
#9
|
|||
|
|||
Hmm OK the test variables are working now, but I have a problem with teh original $message.
It seems like at some point the $message variable turns from being the text inside the HIDE tags Code:
[HIDE]this content here[/HIDE] Code:
The full topic post is then held in the topic variable [HIDE]this content here[/HIDE] See, like this Here's what's in the hide hack xml file (notice the $message variable - which does output the text I need correctly) Code:
<template name="bbcode_hposts" templatetype="template" date="1155999281" username="admin" version="2.7.0"><![CDATA[<div style="margin: 5px 20px 20px 20px;" id="<if condition="$canview">enb<else />dis</if>_hhr_hide::{$this->vars['postid']}_{$hidefieldid}"> <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2" style="border:1px inset"> <div>$caption:</div> <div style="font-style:italic"> <if condition="$canview"> $message <else /> $vbphrase[hidetag_accessdenied] </if> </div> </td> </tr> </table> </div>]]></template> Code:
$post['message'] = $GLOBALS['hhr']->parse_bbcode($post['message'], $forum['forumid'], $thread['threadid'], $post['postid'], $post['userid']); |
#10
|
||||
|
||||
Once you 'post' a message, the entire text includes any bbcode tags that you have in there. They aren't stored separately. So, I'm not sure about what you mean about intercepting it between when it is just the bbcode and when it is the full message.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|