Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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.
 



 
lord1Send 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: 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.

It could help if you post the modified part but maybe you added the code between these tags?

Code: [Download] [Hide] [Select]
                <!-- IF S_LOGGED_IN -->
?your modification?
                <!-- ENDIF -->


I hope this helped alittle,
...Joshua203
 




____________
www.DutchaGoGo.com (development/under construction ...Forever?¿?)
 
Joshua203Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
lord1Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Page Permisions 
 
lord1 wrote: [View Post]
if i place those tags only reg users will see the link.


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  ?
 




____________
www.DutchaGoGo.com (development/under construction ...Forever?¿?)
 
Joshua203Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
lord1Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Page Permisions 
 
sorry for not understanding immediately (languages hmmm)

how about adding this <!-- IF S_LOGGED_IN --> to the linked page?


Edit: Sorry Spydie ...same time posting , thanks for jumping in
 




____________
www.DutchaGoGo.com (development/under construction ...Forever?¿?)
 
Joshua203Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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: [Download] [Hide]
  1. if (!$userdata['session_logged_in']) 
  2.     redirect(append_sid('login_ip.' . PHP_EXT . '?redirect=yourpage.' . PHP_EXT, true)); 
  3.  


Im talking something like this
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Page Permisions 
 
spydie ,thats exactly what i ment but i have a litle prob with  redirect function
Link
Code: [Download] [Hide] [Select]
<?php
/**
*
* @package Icy Phoenix
* @version $Id: album.php 96 2009-04-27 16:48:19Z Mighty Gorgon $
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/GPL-license.php GNU Public License
*
*/

/**
*
* @Extra credits for this file
* Smartor (smartor_xp@hotmail.com)
*
*/
define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));

if (!$userdata['session_logged_in'])
{
    redirect(append_sid('login_ip.' . PHP_EXT . '?redirect=files/Chess.swf.' . PHP_EXT, true));
}
 

page code
 



 
lord1Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Page Permisions 
 
lets think, that your problem is here

Chess.swf.' . PHP_EXT,

witch translates into Chess.swf.php


put it this way

redirect=files/Chess.swf' , true));

and you might think about including common.php




by the way,

you should think about creating an tpl file, with your swf file and a player included

maybe have a look at this http://www.icyphoenix.com/viewtopic.php?f=4&t=6436
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Page Permisions 
 
im getting the same error, what about the "simple way"
including auth check , can u show me how it looks easyer for me  
 



 
lord1Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Page Permisions 
 
OK so you want it all done, is taht what you call the easy way??

this in your route

chess.php

Code: [Download] [Hide] [Select]
<?php
/***************************************************************************
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/GPL-license.php GNU Public License
*
*                                my template.php
*                            -------------------
*    Instructions by Lopalong 8th September 2009 < http://www.lopalong.com >.
*
***************************************************************************/

/***************************************************************************
 *
 *     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);
?>


and this in templates/default/chess.tpl
Code: [Download] [Hide] [Select]
<table width="100%" border="0">
  <tr>
    <td><div align="center">
      <h1>Chess        </h1>
      <p>
        The Macromedia player code, including path of your swf file
      </p>
      </div></td>
    
</table>


only thing you need to edit is the tpl file
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.

With alert:

Code: [Download] [Hide] [Select]
        <!-- IF not S_LOGGED_IN -->
        <a href="JavaScript:void(0);" onclick="alert('You must register or log in to be able to play chess?')">Chess</a>&nbsp;&nbsp;<img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />&nbsp;
        <!-- ELSE -->
        <a href="{FULL_SITE_PATH}chess.swf" target="_blank">Chess</a>&nbsp;&nbsp;<img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />&nbsp;
        <!-- ENDIF -->


Or, With alert and re-direct to login_ip.php:

Code: [Download] [Hide] [Select]
       <!-- IF not S_LOGGED_IN -->
        <a href="{FULL_SITE_PATH}login_ip.php" onclick="alert('You must register or log in to be able to play chess?')">Chess</a>&nbsp;&nbsp;<img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />&nbsp;
        <!-- ELSE -->
        <a href="{FULL_SITE_PATH}chess.swf" target="_blank">Chess</a>&nbsp;&nbsp;<img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />&nbsp;
        <!-- ENDIF -->


Or, No alert and re-direct to login_ip.php:  

Code: [Download] [Hide] [Select]
       <!-- IF not S_LOGGED_IN -->
        <a href="{FULL_SITE_PATH}login_ip.php">Chess</a>&nbsp;&nbsp;<img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />&nbsp;
        <!-- ELSE -->
        <a href="{FULL_SITE_PATH}chess.swf" target="_blank">Chess</a>&nbsp;&nbsp;<img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />&nbsp;
        <!-- ENDIF -->

 



 
mortSend private message  
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


  

 

  cron