Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tanirtheone

Pages: [1]
1
Discussion & Troubleshooting / Re: new separate signin page for 4images :)
« on: September 10, 2009, 09:36:41 PM »
welll was getting bored :) so tried to create this on my own .  .  .  .  .  .  . 
its 100% working .  .  .  .   and if u guys wanna change it then u can.  .  .   certainly after seeing this thread .  .  . 


OKKK lets start .  .  .  .   =).  .  .  . 


step1 :

create three templates.  .  .  .  ( modified ) they r attached pls down load them

open includes/page_header.  php :

find:
//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if ($user_info['user_level'] >= USER) {
  $site_template->register_vars("lang_loggedin_msg", preg_replace("/".  $site_template->start.  "loggedin_user_name".  $site_template->end.  "/siU", format_text($user_info['user_name'], 2), $lang['lang_loggedin_msg']));
  $user_box = $site_template->parse_template("user_logininfo");
  $site_template->register_vars(array(
    "user_box" => $user_box,
    "user_loggedin" => 1,
    "user_loggedout" => 0,
    "is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0
  ));
  $site_template->un_register_vars("user_logininfo");
  unset($user_box);
}
else {
  $user_box = $site_template->parse_template("user_loginform");
  $site_template->register_vars(array(
    "user_box" => $user_box,
    "user_loggedin" => 0,
    "user_loggedout" => 1,
    "is_admin" => 0
  ));
  $site_template->un_register_vars("user_loginform");
  unset($user_box);
}

replace with :
//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if ($user_info['user_level'] >= USER) {
  $site_template->register_vars("lang_loggedin_msg", preg_replace("/".  $site_template->start.  "loggedin_user_name".  $site_template->end.  "/siU", format_text($user_info['user_name'], 2), $lang['lang_loggedin_msg']));

$user_box2 = $site_template->parse_template("user_logininfo");

$site_template->register_vars(array(
    "user_box2" => $user_box2,
    "user_loggedin" => 1,
    "user_loggedout" => 0,
    "is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0
  ));

  $site_template->un_register_vars("user_logininfo");
  unset($user_box2);
}
else {
  $user_box = $site_template->parse_template("user_loginform");
  $site_template->register_vars(array(
    "user_box" => $user_box,
    "user_loggedin" => 0,
   "user_loggedout" => 1,
    "is_admin" => 0
  ));
  $site_template->un_register_vars("user_loginform");
  unset($user_box);
  $user_box3 = $site_template->parse_template("user_login");
  $site_template->register_vars(array(
    "user_box3" => $user_box3
   ));
  $site_template->un_register_vars("user_login");
  unset($user_box3);
}


step 2: create a new template .  .  .  Signin.  html and Signin.  php

code for signin.  php:

<?php
$main_template = 'Signin';

define('GET_CACHES', 1);
define('ROOT_PATH', '.  /');
include(ROOT_PATH.  'global.  php');
require(ROOT_PATH.  'includes/sessions.  php');
$user_access = get_permission();
include(ROOT_PATH.  'includes/page_header.  php');

$error = 0;
if ($user_info['user_level'] != GUEST || empty($HTTP_POST_VARS['user_name']) || empty($HTTP_POST_VARS['user_password'])) {
  if (!ereg("index.  php", $url) && !ereg("login.  php", $url) && !ereg("register.  php", $url) && !ereg("member.  php", $url) && !ereg("details.  php",$url)) {
    redirect($url);
   
  }
}
else {
    $error = $lang['invalid_login'];
  }

if ($error) {
  $main_template = "error";
  include(ROOT_PATH.  'includes/page_header.  php');
  show_error_page($error);
}


$site_template->print_template($site_template->parse_template($main_template));

include(ROOT_PATH.  'includes/page_footer.  php');
?>

Note .  .  .  .   u will have to include --> && !ereg("somepage.  php", $url) for every new page you createee.  .  .  .  . 

for signin.  html just create an empty html .  .  .  .  .   and put this code to a suitable place .  .  .  .   welll just at the middle of ur empty page .  .  .  . 

code to put :

<table align="center">

                 <tr><td>{user_box}{user_box2}</td></tr>

</table>


step3:      

on every page .  .  .  .   put the following code to suitable place according to ur design criteria :) .  .  .   note : u can always chnage the design of the attached html files to ur liking .  .  .  . 

code to put :

{user_box3}{user_box2}

step 4

open urtemplate/header. html

put this code inside the head section so that the user is always redirected to the page he came from ::

<script language="JavaScript">

var time = null

function move() {

window. location = '<?php $pp = $_GET["pp"]; echo($pp);?>'

}

</script>




thats it :) enjoi ur new signin page for 4images :)

2
Discussion & Troubleshooting / new separate signin page for 4images :)
« on: September 10, 2009, 08:56:23 PM »
we need a new thread for this signin page :)

3
Corrections :

open admin/index
Find :
<html dir="<?php echo $lang['direction']; ?>">
  <head>
    <title><?php echo $config['site_name']; ?> Control Panel</title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['charset']; ?>">

Add After it :
<link rel="stylesheet" href=". /cpstyle. css">
    <link rel="stylesheet" href=". /sddm. css">

Find:
<html dir="<?php echo $lang['direction']; ?>">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['charset']; ?>">
    <link rel="stylesheet" href=". /cpstyle. css">

Add After it :
 <link rel="stylesheet" href=". /sddm. css">




Tat will b PerfecT ;)


4
Templates & Styles (Requests & Discussions) / Re: Menu?
« on: July 10, 2009, 03:07:56 PM »
Hi,

one question? do you lose with this links the session?

I thing it is better looks like the link tags:
in includes/page_header.php
search:
Code: [Select]
  "url_captcha_image" => $site_sess->url(ROOT_PATH."captcha.php"),after add:
Code: [Select]
  "url_therms" => $site_sess->url(ROOT_PATH."therms.php"),search:
Code: [Select]
  "charset" => $lang['charset'],after add:
Code: [Select]
  "lang_therms" => $lang['therms'],

add in lang/my_language/main.php:
Code: [Select]
$lang['therms'] = "Therms";
add in my_menue.html, where do you like the link:
Code: [Select]
<a href="{url_therms}">{lang_therms}</a>

Quote
And why do I have to add these things that KurtW added?
- You logged in with a seesion id and with this links you lost it.
- Multi language possible




KurtW




done as advised ... but stilll the session variables are lost .. as i move from the home to the already builtin pages ...eg from index.php to top.php or search.php  the session variables r lost nd the user has to sign in again ..... but the session is still intact when i go to the new pages that i hv created ........ do u hv ne solution for this .. !! reply plsss

5
www.photobangla.com

pls visit it if u hv sir.. and sorry for the late responce cz of my screwed net ..

well just did a bit of modification !!! if u want i can send u the php files.... not too big a modification was done .... but its quiet goood hope u like it !!!

welll um a noob in php ... but if u can pls explain how the input capturing thing works in a bit more detail then it will b a great help

and plus do we have a mod in which v can search the image by its ID .....
and nother mod...very imp....
by which v can dl the Image using the image ID but not he name wit which it was uploaded .... thnks in advance ur responce is highly anticipated @ V@no !!

6
hi V@no !!! this is arif ....

i have made a new signin page ... and the users logs in through tat page !!
but i want the user to b redirected to the previous page when they sign in from the signin page !!!

is this possible .... if yes ..plsss the fixx !!!! ?????  thnxx in advanceeE !!!! =)

Pages: [1]