Announcement

Collapse
No announcement yet.

Hide Attachments from selected Forums for Selected Groups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide Attachments from selected Forums for Selected Groups

    Want to hide Attachments from selected forums for selected groups.

    My code was into postbit


    Code:
    		<if condition="$show['attachments']">
    
    
    <if condition="($forum['forumid'] == 7 OR $forum['forumid'] == 51) AND in_array($bbuserinfo[usergroupid], array(13,6,4))">
    
    <fieldset class="fieldset">
    <legend>$vbphrase[attached_files]</legend>
    <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    <font color="red"> You have no Permissions to view this Attachment </font>
    </table>
    </fieldset>
    <else />
    
    
    
    		<!-- attachments -->
    			<div style="padding:$stylevar[cellpadding]px">
    			
    			<if condition="$show['thumbnailattachment']">
    				<fieldset class="fieldset">
    					<legend>$vbphrase[attached_thumbnails]</legend>
    					<div style="padding:$stylevar[formspacer]px">
    					$post[thumbnailattachments]
    					</div>
    				</fieldset>
    			</if>
                            <if condition="$show['nfo']">
                                    <fieldset class="fieldset">
                                            <legend>Release Information</legend>
                                            <div style="padding:$stylevar[formspacer]px">
                                            $post[nfoattachments]
                                            </div>
                                    </fieldset>
                            </if>		
    			<if condition="$show['imageattachment']">
    				<fieldset class="fieldset">
    					<legend>$vbphrase[attached_images]</legend>
    					<div style="padding:$stylevar[formspacer]px">
    					$post[imageattachments]
    					</div>
    				</fieldset>
    			</if>
    			
    			<if condition="$show['imageattachmentlink']">
    				<fieldset class="fieldset">
    					<legend>$vbphrase[attached_images]</legend>
    					<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    					$post[imageattachmentlinks]
    					</table>
    					</fieldset>
    			</if>
    			
    			<if condition="$show['otherattachment']">
    				<fieldset class="fieldset">
    					<legend>$vbphrase[attached_files]</legend>
    					<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    					$post[otherattachments]
    					</table>
    				</fieldset>
    			</if>
    			
    			<if condition="$show['moderatedattachment']">
    				<fieldset class="fieldset">
    					<legend>$vbphrase[attachments_pending_approval]</legend>
    					<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    					$post[moderatedattachments]
    					</table>
    				</fieldset>		
    			</if>
    			
    			</div>
    		<!-- / attachments -->
    
    </if>
    
    
    
    		</if>
    		$template_hook[postbit_signature_start]
    but dont work, need some help please, also needed if user into some secondary group
    that allowed to see attachment on selected forum.

    thanx

    TBolley

  • #2
    Your condition should be somthing similar to the following

    PHP Code:
    $groups fetch_membergroupids_array($bbuserinfo);
    if(
    in_array(x$groups) ){
              
    //Your stuff goes here!

    while(true){
    if(
    $someone->needsHelp() && $i->canHelp()) $post->help();
    if(
    $i->findBug()) $post->bug();
    }

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X