vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to insert content below a bbcode? (https://vborg.vbsupport.ru/showthread.php?t=308623)

piratarg 02-20-2014 12:56 AM

How to insert content below a bbcode?
 
Hi, I would like to insert an advertisement under a bbcode. Is it possible?

I tried editing the bbcode and adding below:

Code:

<vb:if condition="is_member_of($bbuserinfo, 1)">
advertisement
</vb:if>

I also tried creating a new template and adding within the bbcode:

Code:

{vb:raw my_template}
But does not work. Please help! :confused:

ozzy47 02-20-2014 01:01 AM

Edited Post!

Try this:

Code:

<div>
        <vb:if condition="$show['guest']">
                advertisement
        </vb:if><br />
</div>

That will show it to guests, since that is what it looks like you are trying to do

piratarg 02-20-2014 01:45 AM

Thanks ozzy47, but not working. Displays "advertisement" to all groups.

ozzy47 02-20-2014 01:47 AM

Which one, my revised code above with the <vb:if condition="$show['guest']">?

piratarg 02-20-2014 01:48 AM

Quote:

Originally Posted by ozzy47 (Post 2482535)
Which one, my revised code above with the <vb:if condition="$show['guest']">?

yes, the same.

ozzy47 02-20-2014 01:50 AM

That's virtually impossible, I tested this out and it is only showing for guests.

Did you add that code to the bbcode template directly?

piratarg 02-20-2014 02:02 AM

Quote:

Originally Posted by ozzy47 (Post 2482537)
That's virtually impossible, I tested this out and it is only showing for guests.

Did you add that code to the bbcode template directly?

I edit the bbcode and added below:

Title: Spoiler

Replacement:
Code:

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><u>Spoiler</u>: <input type="button" value="Mostrar" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Ocultar'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostrar'; }">
</div>
<div style="margin: 0px; padding: 6px; border: 0px inset;">
<div style="display: none;">{param}
</div>
</div>
</div>
<div>
<vb:if condition="$show['guest']">
Advertisement
</vb:if>

</div>

I do not work. I doing something wrong?

ozzy47 02-20-2014 02:08 AM

Well I did not try with a custom bbcode like the spoiler, I tried it with default bbcodes.

Try it with a default one such as bbcode_code which is the code bbcode in the post, # in the editor, and see if it works there.

piratarg 02-20-2014 02:24 AM

Quote:

Originally Posted by ozzy47 (Post 2482543)
Well I did not try with a custom bbcode like the spoiler, I tried it with default bbcodes.

Try it with a default one such as bbcode_code which is the code bbcode in the post, # in the editor, and see if it works there.

Yes, by editing that template if it works.
Would it be possible to do the same with a custom bbcode? :(

ozzy47 02-20-2014 02:26 AM

Not sure, you will have to ask in the thread where you got the mod from.


All times are GMT. The time now is 09:18 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.01098 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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