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 05-07-2014, 11:09 PM
AFF648 AFF648 is offline
 
Join Date: May 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Repeating Image HTML in vbcms_content_section

I want to place an image using html in the content section index page after so many entries. What I have so far is that works to place the image after the Nth entry is below. But, I want it to be after the 4, 8, 12, etc listing on the index page.

<vb:each from="contents" key="id" value="content">
<div class="fullwidth<vb:if condition="$id != 1"> cms_separator</vb:if>">
{vb:raw content}
</div>
<vb:if condition="$id == 5">
<div class="fullwidth cms_separator">
IMAGE HTML HERE
</div>
</vb:if>
</vb:each>

I have tried this to get the interval I want (I also tried a long string of nested IF statements, but won't cut and paste that mess in here since I suspect there is a much cleaner way to do it):

vb:each from="contents" key="id" value="content">
<div class="fullwidth<vb:if condition="$id != 1"> cms_separator</vb:if>">
{vb:raw content}
</div>
<vb:if condition="$id == 4 OR 8 OR 12 or 16">
<div class="fullwidth cms_separator">
IMAGE
</div>
</vb:if>
</vb:each>

Once that problem is solved, if possible, I would also like it to be displayed for all user groups, except for group 117. To hide it for the 117 group I tried below. It doesn't return an error, but it doesn't show the image to any group:

vb:each from="contents" key="id" value="content">
<div class="fullwidth<vb:if condition="$id != 1"> cms_separator</vb:if>">
{vb:raw content}
</div>
<vb:if condition="!is_member_of($bbuserinfo, 117)">
<vb:elseif condition="$id == 4">
<div class="fullwidth cms_separator">
IMAGE
</div>
</vb:elseif>
</vb:if>
</vb:each>

I'm new to this and learning quick but not quick enough since this one has stymied me so far. I got the exact same concept to work in a thread by using the remainder function, but no luck yet in the content_section template. Any ideas? Thanks!
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 03:53 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.03525 seconds
  • Memory Usage 2,158KB
  • Queries Executed 13 (?)
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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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_postinfo_query
  • fetch_postinfo
  • 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