https://www.icyphoenix.com/viewtopic.php?f=35&t=7429 ----------------------------------- lord1 Mon 01 Nov, 2010 15:16 Page Permisions ----------------------------------- First problem is that if i creat a quick link to a page in the cms menu its not shown . Second is that i created a quick link by editing nav_quck_links.tpl but i want some links to be shown to unregistred users but when they click it i want to require a registration. ----------------------------------- Joshua203 Mon 01 Nov, 2010 17:02 Re: Page Permisions ----------------------------------- Hi Lord1, [quote]Second is that i created a quick link by editing nav_quck_links.tpl but i want some links to be shown to unregistred users but when they click it i want to require a registration.[/quote] It could help if you post the modified part but maybe you added the code between these tags? [code linenumbers=false] ?your modification? [/code] I hope this helped alittle, ...Joshua203 ----------------------------------- lord1 Mon 01 Nov, 2010 17:27 Re: Page Permisions ----------------------------------- if i place those tags only reg users will see the link. I dont want that ,i want everyone too see it but for unregistred users ,when they click,i want to require registration and then they will be able to see what it contains. ----------------------------------- Joshua203 Mon 01 Nov, 2010 17:36 Re: Page Permisions ----------------------------------- [quote user="lord1" post="50584"]if i place those tags only reg users will see the link. [/quote] exactly.. this is why i asked if you put it between those tags, because that would explain why they need to login first to see, maybe you can double check where you put your code ? ----------------------------------- lord1 Mon 01 Nov, 2010 17:50 Re: Page Permisions ----------------------------------- its placed where it should be,please read again my problem. its already visible for all users but i want to require registration when unregistred users click it so after reg they would be able to see it. ----------------------------------- spydie Mon 01 Nov, 2010 18:25 Re: Page Permisions ----------------------------------- so why don´t you include an auth check in your new page ?? so only reg users see the page , but everybody sees the link so if a user is´nt registrated, he would be automaticly redirected to login.php or profil.php?mode=register ----------------------------------- Joshua203 Mon 01 Nov, 2010 18:27 Re: Page Permisions ----------------------------------- sorry for not understanding immediately (languages hmmm) how about adding this to the linked page? Edit: Sorry Spydie ...same time posting :oops: , thanks for jumping in ----------------------------------- spydie Mon 01 Nov, 2010 18:59 Re: Page Permisions ----------------------------------- Oehm. I supose we´re talking an php file, not an html or tpl. This IF is´nt the correct thing then. should be an auth check in an php file. [code]if (!$userdata['session_logged_in']) { redirect(append_sid('login_ip.' . PHP_EXT . '?redirect=yourpage.' . PHP_EXT, true)); } [/code] Im talking something like this ----------------------------------- lord1 Mon 01 Nov, 2010 20:15 Re: Page Permisions ----------------------------------- spydie ,thats exactly what i ment but i have a litle prob with redirect function [url=http://socialsyndrome.ro/jocuri.php]Link [code linenumbers=false]. * ***************************************************************************/ /*************************************************************************** * * READ THIS! Wherever you see MY_TEMPLATE or My_Template or my_template, replace with whatever you * want to call your new page. * ***************************************************************************/ // CTracker_Ignore: File checked by human define('IN_ICYPHOENIX', true); if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './'); if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1)); include(IP_ROOT_PATH . 'common.' . PHP_EXT); /***** If you want to create VARS (Custom) that do not already exist in Icy Phoenix, you can add them to this page, or create the file "variables.php" for variable-transition of your own "Stand-Alone VARS" to the .tpl file(s). So you will need to uncomment the line below. *****/ // include(IP_ROOT_PATH . 'variables.' . PHP_EXT); // standard session management $userdata = session_pagestart($user_ip); init_userprefs($userdata); // Check if user is logged in if (!$userdata['session_logged_in']) { redirect(append_sid('login_ip.' . PHP_EXT . '?redirect=files/chess.' . PHP_EXT, true)); } // set the page title $page_title = 'Chess'; // The standard page header include(IP_ROOT_PATH . 'includes/page_header.' . PHP_EXT); // assign the template $template->set_filenames(array('body' => 'chess.tpl')); $template->assign_vars(array( // This is where you would add a new VARS Array and any of your own if you intend to use your OWN custom VARS with a variables.php file. )); $template->pparse('body'); // standard page footer include(IP_ROOT_PATH . 'includes/page_tail.' . PHP_EXT); ?> [/code] and this in templates/default/chess.tpl [code linenumbers=false]

Chess

The Macromedia player code, including path of your swf file

[/code] only thing you need to edit is the tpl file ----------------------------------- mort Sat 04 Dec, 2010 00:39 Re: Page Permisions ----------------------------------- If you don't want to create, or don't need a template etc - Add this to the header menu bar for something quick and easy. Change paths and language to suit. [b]With alert:[/b] [code linenumbers=false] Chess    Chess    [/code] [b]Or, With alert and re-direct to login_ip.php:[/b] [code linenumbers=false] Chess    Chess    [/code] [b]Or, No alert and re-direct to login_ip.php:[/b] :roll: [code linenumbers=false] Chess    Chess    [/code]