PDA

View Full Version : Problem editing Templates


Aadil
04-18-2009, 02:54 PM
Hey when i edit some templates i get the following error:

Fatal error: Using $this when not in object context in /includes/adminfunctions_template.php(3939) : eval()'d code on line 1

Nothing has been changed to them but upgrading to 3.8.2

can anyone help :)

Lynne
04-18-2009, 03:10 PM
Try disabling your modifications/plugins and see if you still have this problem.
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

Aadil
04-18-2009, 04:44 PM
kk will try it out thanks

Aadil
04-21-2009, 03:32 AM
Nope it still happens!

Also now my Admincp right frame is all white when u go into it..

but if u change page its works file.. but the Control Panel Home is stuffed

Lynne
04-21-2009, 03:38 AM
Have you tried reuploading all the files in the includes directory?

Aadil
04-21-2009, 03:41 AM
mhm no :P shall do that next :D

Thanks

Aadil
04-22-2009, 10:23 PM
just did that and its still blank :S

I disabled all plugins as well but its still blank

--------------- Added 1240442880 at 1240442880 ---------------

nvm i renamed admincp files and its fixed now

however i still get

Fatal error: Using $this when not in object context in /.../public_html/includes/adminfunctions_template.php(3939) : eval()'d code on line 1

Dismounted
04-23-2009, 05:26 AM
Does it happen with specific templates only - or all templates?

Aadil
04-23-2009, 06:50 AM
specific

Dismounted
04-23-2009, 07:28 AM
And they are? (Post the contents of one.)

Aadil
04-23-2009, 08:42 AM
well i have only found one and its of bbcode_hrply

<div style="margin: 5px 20px 20px 20px;" id="<if condition="$canview">enb<else />dis</if>_hhr_hide_reply::{$this->vars['postid']}_{$hidefieldid}">
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%">
<tr>
<td class="alt2" style="border:1px inset">
<div style="font-style:italic">
<if condition="$canview">
<img src="$stylevar[imgdir_misc]/unlocked.gif" alt="" /><br />$message
<else />
<img src="$stylevar[imgdir_misc]/locked-hrply.gif" alt="$vbphrase[hidetag_accessdenied_hrply]" /><br />$vbphrase[hidetag_accessdenied]
</if>
</div>
</td>
</tr>
</table>
</div>

w2k3
05-19-2009, 12:24 AM
I have too this problem.. anyone fix it ?

Aadil
06-01-2009, 10:08 AM
Bump!

Princeton
06-01-2009, 11:48 AM
template bbcode_hrply is not default vbulletin

make sure you disable plugins as suggested by Lynn in Post #2 (https://vborg.vbsupport.ru/showpost.php?p=1793957&postcount=2)

Aadil
06-01-2009, 11:52 AM
yeah i did and still didnt work.. happens to some other templates as well.

Lynne
06-01-2009, 02:21 PM
Which default vbulletin templates does it happen with?

You may want to put in a support ticket if it's been this long that you've had the problem.

Aadil
06-01-2009, 09:04 PM
not sure i didnt take note of which one.. but if i disable all plugins it still happens i will look for the template

Lynne
06-01-2009, 10:12 PM
Besides disabling the plugins, did you also try reuploading *all* the default vbulletin files?

If reuploading all the default vb files still doesn't fix it (with the plugins off), you may want to just put in a support ticket.

akanevsky
06-01-2009, 11:52 PM
This template is from the hide hack that you have installed. Please consider upgrading to the last version of the hack and then edit your template again. Otherwise, you could replace $this->vars['postid'] by $postinfo['postid'].

Aadil
06-12-2009, 07:04 AM
This template is from the hide hack that you have installed. Please consider upgrading to the last version of the hack and then edit your template again. Otherwise, you could replace $this->vars['postid'] by $postinfo['postid'].

Thanks that worked!!