vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Request: VB3 Administrative Post Custome Background. (https://vborg.vbsupport.ru/showthread.php?t=60034)

Xenon 01-21-2004 03:42 PM

please, don't post such often in a line, not everyone is here during the whole day ;)

the first thing:
HTML Code:

<if condition="$show['admincplink']">
can be replaced by
HTML Code:

<if contidion="in_array($bbuserinfo['usergroupid'], array(5,6,7))">
that allows all admins/mods/sm's to use the checkbox (primary usergroup counts)

second condition:

HTML Code:

<if condition="$post['isofficial'] == 1">
<table width="100%" border="0" align="center" cellpadding="$stylevar[cellpadding]" cellspacing="0" bgcolor="#990000" class="tborder">
<else />
<table width="100%" border="0" align="center" cellpadding="$stylevar[cellpadding]" cellspacing="0" class="tborder">
</if>

and yes, postbit is the correct template (or postbit_legacy, depending on your settings ;))

Aceman 01-21-2004 05:59 PM

I tried your code:

Code:

<if contidion="in_array($bbuserinfo['usergroupid'], array(5,6,7))">
And repeated get this message:

"The following error occurred when attempting to evaluate this template:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/aceman/public_html/forums/includes/adminfunctions_template.php(2998) : eval()'d code on line 148

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish."

When I put back my orginal code it seems to work, meaning I don't get the error message.

As for editing the Postbit_legacy template. I placed the code you indicated above.. made a post in the quickreply and checked the box.. but nothing changes visually when thread is shown. So I'm not sure if my FORM is properly setup so that it looks for the "isoffical" == 1.

This is the coding I used in showthread_quickreply"

Code:

<if condition="$show['admincplink']">
<label for="qr_isoffical">
<input type="checkbox" name="isoffical" value="1" id="qr_isoffical" tabindex="6" />$vbphrase[isoffical]</label>
</if>

Thank you in advance
Aceman

and I'll wait before I post again to hear from someone.

Vigile 01-21-2004 07:47 PM

Quote:

Originally Posted by Aceman
I tried your code:

Code:

<if contidion="in_array($bbuserinfo['usergroupid'], array(5,6,7))">
And repeated get this message:

"The following error occurred when attempting to evaluate this template:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/aceman/public_html/forums/includes/adminfunctions_template.php(2998) : eval()'d code on line 148

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish."

When I put back my orginal code it seems to work, meaning I don't get the error message.

As for editing the Postbit_legacy template. I placed the code you indicated above.. made a post in the quickreply and checked the box.. but nothing changes visually when thread is shown. So I'm not sure if my FORM is properly setup so that it looks for the "isoffical" == 1.

This is the coding I used in showthread_quickreply"

Code:

<if condition="$show['admincplink']">
<label for="qr_isoffical">
<input type="checkbox" name="isoffical" value="1" id="qr_isoffical" tabindex="6" />$vbphrase[isoffical]</label>
</if>

Thank you in advance
Aceman

and I'll wait before I post again to hear from someone.

maybe im crazy or just out of it with too little sleep, but does not the ' ' needto be removed, making:
HTML Code:

<if contidion="in_array($bbuserinfo['usergroupid'], array(5,6,7))">
into

HTML Code:

<if contidion="in_array($bbuserinfo[usergroupid], array(5,6,7))">
with the same needing to be modified in the second condition as Xenon posted?

Just slap me if Im out of it. thanx.

NTLDR 01-21-2004 07:57 PM

Array indexes should be quoted within the <if> condition, but not elsewhere in the templates ;)

Zachery 01-21-2004 08:33 PM

btw the class might overright that color Xenon for tborder... just a note

might want to use style instead

Xenon 01-21-2004 10:52 PM

Quote:

Originally Posted by Faranth
btw the class might overright that color Xenon for tborder... just a note

might want to use style instead

i just provided the conditional, i have not looked if the html code itself does what it should ;)

as for the conditional, hmm, it works for me, as i have used it several times already..

Aceman 01-22-2004 12:37 AM

Vigile - Your modified conditional works perfectly.

I'm still trying to get the table to change the background.. when the condition == 1 :) I'm still pluggin away.. if anyone has an idea lemme know.

I'll keep you informed.

BTW- Thanks for all the help.. you all are great.
Aceman

Zachery 01-22-2004 12:44 AM

Quote:

Originally Posted by Xenon
i just provided the conditional, i have not looked if the html code itself does what it should ;)

as for the conditional, hmm, it works for me, as i have used it several times already..

well im fairly sure its just not XHTML standard >.< but just a thought :)

Aceman 01-22-2004 01:28 AM

Just a quick update. I think I got it working.. and I say "think" because I'm really not sure..

When I made a new post via quickreply the thread appreared "RED" #990000 for a split second then turned blue like the theme I'm in.. so I think somehow the appearance of the thread is getting overriden when it's displayed so I'm now sifting through the code to find where then might be happening. More soon.

The Code I used for postbit_legacy is:

Code:

<!-- post #$post[postid] -->
<if condition="$show['spacer']">$spacer_open<if condition="!$post['islastshown']"><div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if></if>
<!--
  <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center"> -->
<if condition="$post[isofficial] == 1">
<table width="100%" border="0" align="center" cellpadding="$stylevar[cellpadding]" cellspacing="0" class="tborder">
<else />
<table width="100%" border="0" align="center" cellpadding="$stylevar[cellpadding]" cellspacing="0" bgcolor="#990000" class="tborder">
</if>
    <tr>
      <td class="thead" style="font-weight:normal" $scrolltothis>
        <!-- status icon and date -->
        <a name="post$post[postid]"><img src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
        <if condition="!$show['start_until_end']"> $post[postdate]<if condition="!$show['detailedtime']">,
        $post[posttime]</if> <else /> $post[startdate] until $post[enddate] </if>
        $post[firstnewinsert]
        <!-- / status icon and date -->
      </td>

REMAINDER IS UNCHANGED.


Vigile 01-22-2004 03:11 AM

Quote:

Originally Posted by NTLDR
Array indexes should be quoted within the <if> condition, but not elsewhere in the templates ;)

I dunno... I can only tell ya what tinkering issues I have run into..

any point in a template, that has $sumtin[sumtin] having $sumtin['sumtin'] ,whether inside an if conditional or not, has never worked when I do it. Im not sure why, just told him what works for me. :)


All times are GMT. The time now is 04:04 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.01196 seconds
  • Memory Usage 1,760KB
  • 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
  • (5)bbcode_code_printable
  • (5)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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