vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   How can I convert this code for vb4 ? (https://vborg.vbsupport.ru/showthread.php?t=280923)

Bulent Tekcan 03-31-2012 09:13 AM

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>


Lynne 03-31-2012 02:26 PM

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.

Bulent Tekcan 04-01-2012 07:01 AM

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>


Pandemikk 04-01-2012 07:17 AM

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.

Bulent Tekcan 04-01-2012 07:36 AM

Quote:

Originally Posted by Pandemikk (Post 2315622)
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.

Pandemikk 04-01-2012 08:23 AM

There's articles to help you learn how to code yourself. Teach a man to code fishes. :D

Lynne 04-01-2012 02:50 PM

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}}


All times are GMT. The time now is 02:37 AM.

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.01380 seconds
  • Memory Usage 1,782KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete