Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Hiding Link By Group 
 
Hi

I found and modified a piece of code so I can hide links from users.. but members in a group will be able to see them..

this is the code...

in includes/page_header.php

Code: [Download] [Hide] [Select]
  $sql = 'SELECT * FROM ' . USER_GROUP_TABLE . '
      WHERE group_id=USER GROUP ID HERE
         AND user_id=' . $userdata['user_id'] . '
         AND user_pending=0
      LIMIT 1';
    
$is_vip = 0;
    
if (($result = $db->sql_query($sql)) != FALSE)
    {
   $is_vip = $db->sql_numrows($result);
   $db->sql_freeresult($result);
    }

if ($is_vip == 0)
    {
   $template->assign_block_vars('non_vips_only', array());
    }


and in the tpl file you need it

Code: [Download] [Hide] [Select]
    
<!-- BEGIN non_vips_only -->
CODE HERE
<!-- END non_vips_only -->


This works great for one group but I have tried and failed so it allows 2 groups...

in the code you have USER GROUP ID HERE where you can place one group id.. I thought if you added a comma and then the second group id it would work but it does not....

 I am at a bit of a loss as how to do this, and I would appreciate any help anyone could offer..

Thanks
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Hiding Link By Group 
 
solved
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: SOLVED - Hiding Link By Group 
 
How did you get it working?
 




____________
| Icy Phoenix ColorizeIt! |
Bipolar Disorder - Not good for you and definitely not good for everyone else.
 
ChaoticSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: SOLVED - Hiding Link By Group 
 
it was for a specific mod that is not included in vanilla icy... and someone on the mods site had posted a solution...

Sadly the code above will only work for one group.. but is still usable if you want to only show links to a certain group

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events