Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2012, 09:13 AM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How can I convert this code for vb4 ?

Hello

I have this code for rounded image bb code.But not work with vb4, anybody help me ?

Code:
<table border="0" cellpadding="0" cellspacing="0" align="center" style="margin-top: 5px; margin-bottom: 5px; width:$stylevar[codeblockwidth];">
  <tr>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="75" valign="bottom">
        <table border="0" cellpadding="0" cellspacing="0" width="50">
          <tr>
            <td width="28" valign="top">
            <img src="$stylevar[imgdir_misc]/quotes/quot-top-left.gif" alt /></td>
            <td width="100%" style="background-image: url('$stylevar[imgdir_misc]/quotes/quote-bg.gif'); background-position: center;" valign="middle">
            <span class="smallfont">$vbphrase[quote]:</span></td>
            <td valign="top">
            <img src="$stylevar[imgdir_misc]/quotes/quot-top-right.gif" alt /></td>
          </tr>
        </table>
        </td>
        <td align="left" style="background-image: url('$stylevar[imgdir_misc]/quotes/quot-lr-bg.gif')" valign="bottom">
        </td>
        <if condition="$show['username']">
        <td width="0" align="left" valign="bottom">
        <table border="0" cellpadding="0" cellspacing="0" width="200">
          <tr>
            <td valign="top">
            <img src="$stylevar[imgdir_misc]/quotes/quot-by-left.gif" alt /></td>
            <td width="100%" style="background-image: url('$stylevar[imgdir_misc]/quotes/quot-bye-bg.gif')" align="left" valign="middle" nowrap="nowrap">
            <span class="smallfont">
<div>
     <phrase 1="$username">$vbphrase[originally_posted_by_x]</phrase>
     <if condition="$postid"><a href="showthread.php?$session[sessionurl]p=$postid#post$postid" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/viewpost.gif" border="0" alt="$vbphrase[view_post]" /></a></if>
    </div>
            <td valign="top">
            <img src="$stylevar[imgdir_misc]/quotes/quot-by-right.gif" alt /></td>
          </tr>
        </table>
        </td>
        <else /></if>
        <td width="100%" align="right" valign="bottom">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td width="100%">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td style="background-image: url('$stylevar[imgdir_misc]/quotes/quot-top-bg.gif')" width="100%" valign="middle">
                </td>
                <td align="left" valign="top">
                <img src="$stylevar[imgdir_misc]/quotes/quot-top-right-10.gif" alt /></td>
              </tr>
            </table>
            </td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="10" style="background-image: url('$stylevar[imgdir_misc]/quotes/quoting-left.gif')">
        </td>
        <td width="100%" valign="top" bgcolor="#ffffff"></td>
        <td width="10" style="background-image: url('$stylevar[imgdir_misc]/quotes/quoting-right.gif')">
        </td>
      </tr>
      <tr>
        <td width="10" style="background-image: url('$stylevar[imgdir_misc]/quotes/quot-left-bg.gif')">
        </td>
        <td width="100%" valign="top" bgcolor="#ffffff" class="smallfont">
        <if condition="$show['username']"><i>$message</i>
        <else />$message</if></td>
        <td width="10" style="background-image: url('$stylevar[imgdir_misc]/quotes/quot-right-bg.gif')">
        </td>
      </tr>
      <tr>
        <td width="10" valign="bottom">
        <img src="$stylevar[imgdir_misc]/quotes/quot-bot-left.gif" alt /></td>
        <td width="100%" style="background-image: url('$stylevar[imgdir_misc]/quotes/quot-bot-bg.gif')">
        </td>
        <td width="10" valign="bottom">
        <img src="$stylevar[imgdir_misc]/quotes/quot-bot-right.gif" alt /></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
Reply With Quote
  #2  
Old 03-31-2012, 02:26 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to change all the conditions to be vb4 conditions, ie <vb:if, not just <if , and also convert all variables not used in conditions to use the vb4 syntax, ie {vb:stylevar imgdir_misc}, not $stylevar[imgdir_misc], and also change the way your phrases are called, ie. {vb:rawphrase quote}, not $vbphrase[quote]. I believe there is an article about this in the articles forums. Or, just look at a template in your Style Manager and you will see how it is now done.
Reply With Quote
  #3  
Old 04-01-2012, 07:01 AM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, I'm not a code exper and still I get some error during save style. I changed many things but I thing some wrong code still here
, can you help me for this ? Last code is here, but I'm not sure it is ok or not.

Code:
<table border="0" cellpadding="0" cellspacing="0" align="center" style="margin-top: 5px; margin-bottom: 5px; width:{vb:stylevar quote_container};">
  <tr>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="75" valign="bottom">
        <table border="0" cellpadding="0" cellspacing="0" width="50">
          <tr>
            <td width="28" valign="top">
            <img src="{vb:stylevar imgdir_misc}/quotes/quot-top-left.gif" alt /></td>
            <td width="100%" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quote-bg.gif'); background-position: center;" valign="middle">
            <span class="smallfont">{vb:rawphrase quote}:</span></td>
            <td valign="top">
            <img src="{vb:stylevar imgdir_misc}/quotes/quot-top-right.gif" alt /></td>
          </tr>
        </table>
        </td>
        <td align="left" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quot-lr-bg.gif')" valign="bottom">
        </td>
        <vb:if condition="$show['username']">
        <td width="0" align="left" valign="bottom">
        <table border="0" cellpadding="0" cellspacing="0" width="200">
          <tr>
            <td valign="top">
            <img src="{vb:stylevar imgdir_misc}/quotes/quot-by-left.gif" alt /></td>
            <td width="100%" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quot-bye-bg.gif')" align="left" valign="middle" nowrap="nowrap">
            <span class="smallfont">
<div>
     <phrase 1="$username">{vb:rawphrase originally_posted_by_x}</phrase>
     <vb:if condition="$postid"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}showthread.php?{vb:raw session.sessionurl}p={vb:raw postid}#post{vb:raw postid}" rel="nofollow"><img class="inlineimg" src="{vb:stylevar imgdir_button}/viewpost-{vb:stylevar right}.png" alt="{vb:rawphrase view_post}" /></a></vb:if>
    </div>
            <td valign="top">
            <img src="{vb:stylevar imgdir_misc}/quotes/quot-by-right.gif" alt /></td>
          </tr>
        </table>
        </td>
        <vb:else />
        <td width="100%" align="right" valign="bottom">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td width="100%">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quot-top-bg.gif')" width="100%" valign="middle">
                </td>
                <td align="left" valign="top">
                <img src="{vb:stylevar imgdir_misc}/quotes/quot-top-right-10.gif" alt /></td>
              </tr>
            </table>
            </td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="10" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quoting-left.gif')">
        </td>
        <td width="100%" valign="top" bgcolor="#ffffff"></td>
        <td width="10" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quoting-right.gif')">
        </td>
      </tr>
      <tr>
        <td width="10" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quot-left-bg.gif')">
        </td>
        <td width="100%" valign="top" bgcolor="#ffffff" class="smallfont">
        <vb:if condition="$show['username']"><i>{vb:raw message}</i>
        <vb:else />{vb:raw message}</vb:if></td>
        <td width="10" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quot-right-bg.gif')">
        </td>
      </tr>
      <tr>
        <td width="10" valign="bottom">
        <img src="{vb:stylevar imgdir_misc}/quotes/quot-bot-left.gif" alt /></td>
        <td width="100%" style="background-image: url('{vb:stylevar imgdir_misc}/quotes/quot-bot-bg.gif')">
        </td>
        <td width="10" valign="bottom">
        <img src="{vb:stylevar imgdir_misc}/quotes/quot-bot-right.gif" alt /></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
Reply With Quote
  #4  
Old 04-01-2012, 07:17 AM
Pandemikk Pandemikk is offline
 
Join Date: Jul 2009
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow that's a lot of code to be asking for help with.

You need to read up on some articles. Those tables and tds will need to be rewritten to divs as well.
Reply With Quote
  #5  
Old 04-01-2012, 07:36 AM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Pandemikk View Post
Wow that's a lot of code to be asking for help with.

You need to read up on some articles. Those tables and tds will need to be rewritten to divs as well.
Can you help me ? Or please send to me articles link ? And also before I ask 1 code but nobody help me also Only said "look at articles" If I know reading articles I never ask about this.
Reply With Quote
  #6  
Old 04-01-2012, 08:23 AM
Pandemikk Pandemikk is offline
 
Join Date: Jul 2009
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's articles to help you learn how to code yourself. Teach a man to code fishes.
Reply With Quote
  #7  
Old 04-01-2012, 02:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your phrase here:
HTML Code:
<phrase 1="$username">{vb:rawphrase originally_posted_by_x}</phrase>
Should be:
HTML Code:
{vb:rawphrase originally_posted_by_x, {vb:raw username}}
Reply With Quote
Reply


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 08:11 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.03778 seconds
  • Memory Usage 2,238KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete