Welcome Guest. Please Login or Register  


You are here: Index > Advanced Electron Forums > Mods > Topic : [mod] Hide link for user

A2 Hosting

News:

Group Message
Hello Guest,

Welcome to the AEF Board. AEF is getting better and better and is also becoming more popular.
Take a few seconds to Register, its free, and it inspires us to work harder and improve on whatever we can improve on.
Give us some feedback, and tell your buddies about AEF!

Thanks,
The AEF Team



Threaded Mode | Print  

 [mod] Hide link for user, not registered user can't see link [url] (12 Replies, Read 25782 times)
Miracl
Group: Member
Post Group: Working Newbie
Posts: 76
Status:
forum version: 1.0.8



open: \main\functions\bbc_functions.php



find:
Quote
function return_url($url){

$url = stripslash($url);

$url = clean_url($url);

$u = $url;

$extra = '';

return '<a href="'.$u.'" target="_blank">'.$u.'</a>';


}



replace for:
Quote
function return_url($url){

global $logged_in;

$url = stripslash($url);
$url = clean_url($url);
$u = $url;
$extra = '';

if(!$logged_in) {
return 'sorry, but only registered user can see link';
}

else {
return '<a href="'.$u.'" target="_blank">'.$u.'</a>';
}


}






find:
Quote
function check_url($href, $name){

$href = preg_replace("/javascript:/i", "javascript-aef: ", $href);

return '<a href="'.stripslash($href).'" target="_blank">'.stripslash($name).'</a>';
}



replace for:
Quote
function check_url($href, $name){

global $logged_in;
$href = preg_replace("/javascript:/i", "javascript-aef: ", $href);

if(!$logged_in) {
return 'sorry, but only registered user can see link';
}
else {
return '<a href="'.stripslash($href).'" target="_blank">'.stripslash($name).'</a>'; }

}




dont forget replace: "sorry, but only registered user can see link"
:angel:


-----------------------
Board Image
sorry for my bad english..
IP: --   

[mod] Hide link for user
acidtech
Group: Member
Post Group: Working Newbie
Posts: 79
Status:

drums.ro admin
oh, thanks a lot mate !! you rock the spot !!


-----------------------
|| drums.ro || MySpace || drums.ro facebook ||

IP: --   

[mod] Hide link for user
elwizard
Group: Member
Post Group: Super Member
Posts: 630
Status:

Very busy - Developing...
karma ++ again Miracl.

-----------------------
RETIRED DEVELOPER

IP: --   

[mod] Hide link for user
kab012345
Group: Member
Post Group: Super Member
Posts: 966
Status:

Super Dooper Moderator :) guess who?
Excellent work!

-----------------------
Retired Support Staff  :nerd:
IP: --   

[mod] Hide link for user
christianfermin
Group: Member
Post Group: Newbie
Posts: 35
Status:
situation: I created a new group called :    VIP
Board Image





Problem:
I only want the VIP group to see links in the (Vip lounge board).


comments: I want all members and guests to be able to see the board, (BUT LINKS, only VIP members can see them. )










IP: --   

[mod] Hide link for user
christianfermin
Group: Member
Post Group: Newbie
Posts: 35
Status:
I'm tring this , but is not working


Code
function return_url($url){

global $logged_in;
    $url = stripslash($url);
    $url = clean_url($url);
    $u = $url;
    $extra = '';
 
    if(!$logged_in) {
        return 'sorry, but only registered user can see link';
    }
  elseif ($logged_in && $board['fid']==24 && $member['u_member_group']==0)
        {
        return 'sorry, but only VIP users can see link';

      }


    else {
        return '<a href="'.$u.'" target="_blank">'.$u.'</a>';
    }


}


Comments: This is the piece of code I added:

Code
elseif ($logged_in && $board['fid']==24 && $member['u_member_group']==0)
        {
        return 'sorry, but only VIP users can see link';

      }



ANYBODY KNOW ? HOW TO HIDE LINKS , IN A BOARD,  AND ONLY VISIBLE FOR CERTAIN GROUPS?


Edited by christianfermin : November 21, 2009, 4:57 am
IP: --   

[mod] Hide link for user
christianfermin
Group: Member
Post Group: Newbie
Posts: 35
Status:
:D  I'm done with it. Thanks for your help Admin.

go to  Aeroforum ->main-> functions-> bb_functions

look for  the two functions below and replace them accordingly .


all you have to replace is the board number, It will block links on that specific board.  for example: a vip lounge board. (to get the board number, click on the board and you will see the number in the address bar.

Board Image

------------------------------------------------------------------------------ ---------
Code
//function 1

function return_url($url){

global $logged_in,$member,$board,$group,$mid,$user;
    $url = stripslash($url);
    $url = clean_url($url);
    $u = $url;
    $extra = '';

 
//block links for unregister users
      if(!$logged_in) {
        return 'sorry, but only registered user can see link';
    }


        elseif ($board['fid']==24 && $user['u_member_group']==0 )

        {
        return 'sorry, but only VIP users can see link';

        }


else {
        return '<a href="'.$u.'" target="_blank">'.$u.'</a>';
    }
}


-------------------------------------------------------------------
//function 2

function check_url($href, $name){


    global $logged_in,$member,$board,$group,$mid,$user;
    $href = preg_replace("/javascript:/i", "javascript-aef: ", $href);

    if(!$logged_in)
      {
        return 'sorry, but only registered user can see link';
        }
   
     
        elseif ($board['fid']==24 && $user['u_member_group']==0 )

        {
        return 'sorry, but only VIP users can see link';

        }
     
  else {
return '<a href="'.stripslash($href).'"target="_blank">� 39;.stripslash($name).'</a>';
    }

}





Edited by christianfermin : November 23, 2009, 7:11 pm
IP: --   

[mod] Hide link for user
kab012345
Group: Member
Post Group: Super Member
Posts: 966
Status:

Super Dooper Moderator :) guess who?
Glad you figured it out, and thanks for sharing your resolution with us. :-)

-----------------------
Retired Support Staff  :nerd:
IP: --   

[mod] Hide link for user
greenzeal786
Group: Member
Post Group: Newbie
Posts: 8
Status:
yes there are numbers of way through which we can hide link from user.


-----------------------
survival kits
IP: --   

[mod] Hide link for user
Aymenbnr
Group: Member
Post Group: Working Newbie
Posts: 60
Status:
hey,can i choose times when i want the link to be hidden,
means like tags or something

-----------------------
Free advertising forum
Free articles directory
IP: --   

[mod] Hide link for user
ghazi119
Group: Member
Post Group: Working Newbie
Posts: 63
Status:
Very nice Mod thnks

-----------------------
IP: --   

[mod] Hide link for user
nexgenforum
Group: Member
Post Group: Working Newbie
Posts: 65
Status:
THANKS BUDDY.  YOUR MOD IS WORKING GREAT ON MY FORUM.  I MADE SOME MODIFICATIONS TOO.  VIEW HERE
 
MY FORUM VER IS 1 0 9  ;-D


-----------------------
DOMAINS HOSTING SSL WEBSITES
All in one place with Affordable prices
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Members who read this topic
, jlhaslip, elwizard, kab012345, svoy, alkutob, dragoneye, WebTurk, nfsalon, ahmed_farouk, okyanus, benjamin, viru5678, ssl9, acidtech, Miracl, Malaria, Firestar, entergeozax, RSI, downesam, Narf, PaNTrk, plexipoker, Ghadamyari, stunod, zenn, ashisbiswas, htr, dreaken, malihove, AKC, kword, jattofhell, llElNeneMxll, Maxjimme, elbawdy, Buster, christianfermin, djmax, VasiliyRS, Aymenbnr, VinceC, andiack, asimo, Mfurkan7, greenzeal786, eastwood1, moro, ghazi119, Dandruff, Design, tinstone, aLbdigital, zain, gamerzvip, bayus4, poiuyt, tiny, Alicomputers, anhteen, runbala, mmsdown, zing, velias, freyers, sedrata, darkenix, Dredgeretk, hamed.gh, mysun, sankat, cristrixy, MaRiAnO, ravirajpoot, raiders, JPeterPan, devmohan, LaBrie, xfiles666, Ottonall, Apama, vijayp4you, JentaVMC, nexgenforum, tunisiashare, Justin, BeeBe, achubs, Profiler, Nokia, antros


Users viewing this topic
1 guests, 0 users.

A2 Hosting

All times are GMT. The time now is December 13, 2019, 6:12 am.

  Powered By AEF 1.1.0 Preview © 2007-2011 AEF Group. All rights reservedQueries: 13  |  Page Created In:0.109