We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Forum | Forum

Michel
Michel Feb 2 '14
done that
Michel
Michel Feb 2 '14
still on my members
dave Leader
dave Feb 2 '14
ok as long is it looks like mine, i included the unchanged part before and one line after the change so you can see were it goes.. 


when that is done try it

dave Leader
dave Feb 2 '14
bud something is not right your not doing something right.  tell me how your clearing your cache


Michel
Michel Feb 2 '14
i go to options on my firefox browser then i do advanced and there it says clear cache
The Forum post is edited by Michel Feb 2 '14
dave Leader
dave Feb 2 '14
how long have you been with oxwall and you have no idea how to clear your cache wow.. 


go to config and change dev mode to true then press control f5 when your on the page 

dave Leader
dave Feb 2 '14
or you can use the free extreme cache plugin if you want to install that but you only use that if you are not in dev mode 
Michel
Michel Feb 2 '14
its the whole time on true :P
dave Leader
dave Feb 2 '14
well thats part of your problem you need to make sure you turn that off when your not changing stuff lol...    so when your not changing stuff change that to false 



anyway hit f5 or control f5 when on the page and tell me if its only for mods 


Michel
Michel Feb 2 '14
i tured it on when i was doing these codes :P nope its still on my members
dave Leader
dave Feb 2 '14
ok well here is a little help tip for you to make it easier 


http://www.oxwall.org/forum/topic/11500



it should be working its set up exactly like mine now and mine is working 


do me a favor copy that section you changed in the php file and post it here... thanks


Michel
Michel Feb 2 '14
      $userId = OW::getUser()->getId();
        $isOwner = ( $topicDto->userId == $userId ) ? true : false;
// logo for moderator only    

//initialize var

    $isMod = 0;


          if(OW::getUser()->isAuthorized('base'))

          {           

          $isMod = 1;               
          }

$this->assign('isMod', $isMod);


//end logo for moderator only

        $postReplyPermissionErrorText = null;



And this {foreach from=$postList item=post name=postList}

{capture assign='tpl'}{capture name='info_string'}

<!-- added -->

{if $isMod}

<img src="http://www.tibiaevents.com/teamlogo.png" border="0" alt="" />

{/if}

<!-- end add -->

<a href="{$avatars[$post.userId].url}">{$avatars[$post.userId].title}</a>
dave Leader
dave Feb 2 '14
ok those are both sections right, i mean the top section is in the php file and the bottom section is in the html file right 
Michel
Michel Feb 2 '14
ye
dave Leader
dave Feb 2 '14
ok so lets test it... go back to  your html file and i want you to add this


right ABOVE that foreach 


{foreach from=$postList item=post name=postList}


so just before that put this 


{$isMod}


and save and clear the cache  you should see a 1 right above the avatar, mine does


dave Leader
dave Feb 2 '14
should be like this, that means its passing the value to the html file 



dave Leader
dave Feb 2 '14
so in this case since i am admin it is a 1 because admins are auth base. 
Michel
Michel Feb 2 '14
ye i see a 1
dave Leader
dave Feb 2 '14
now log in as a normal user, not a mod, and tell me if you see 1 or 0
Michel
Michel Feb 2 '14
i see a 0
Pages: « 1 2 3 4 5 6 »