Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #11  
Old 01-21-2004, 03:42 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 )
Reply With Quote
  #12  
Old 01-21-2004, 05:59 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #13  
Old 01-21-2004, 07:47 PM
Vigile Vigile is offline
 
Join Date: Mar 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #14  
Old 01-21-2004, 07:57 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Array indexes should be quoted within the <if> condition, but not elsewhere in the templates
Reply With Quote
  #15  
Old 01-21-2004, 08:33 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

might want to use style instead
Reply With Quote
  #16  
Old 01-21-2004, 10:52 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #17  
Old 01-22-2004, 12:37 AM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #18  
Old 01-22-2004, 12:44 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #19  
Old 01-22-2004, 01:28 AM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 01-22-2004, 03:11 AM
Vigile Vigile is offline
 
Join Date: Mar 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07138 seconds
  • Memory Usage 2,265KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (5)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete