Author Topic: Menu?  (Read 26554 times)

0 Members and 1 Guest are viewing this topic.

Offline nicky9

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Menu?
« Reply #15 on: May 08, 2008, 12:49:22 PM »
Ok, so if I'm logged in I will with the first code somehow loose "the session"? (Whatever that means? Does it mean I might get logged out or something?)

I plan to add this:

(Left menu)
HOME
FAQ
TOP IMAGES
NEW IMAGES

and if you're logged in, it would be good to also have these menu items:

MY ALBUM (instead of lightbox)
CONTROL PANEL
LOG OUT

(Footer)
About Us | Contact Us | Terms | Privacy | Cookies | Copyright

Should I basically totally skip the first code Manurom wrote and only use the code KurtW provided?

Offline nicky9

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Menu?
« Reply #16 on: May 09, 2008, 04:46:19 PM »
So how do to?  :P

Offline † manurom

  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • manurom's 4images templates
Re: Menu?
« Reply #17 on: May 10, 2008, 10:05:32 AM »
Hello, nicky9;
sorry if we made you confused.

Let's make it step by step, according to KurtW's advice.

1_ LEFT MENU
____You got there 3 core and one custom links.
This custom link is "FAQ", and there you can do a custom template page by reading this FAQ: How to add a new, custom template page.
Once having created your own template page called "FAQ.html" (caution, case sensitive), your template file "my_menu.html" should be like this:
Code: [Select]
<div align="center">
<table  width="100" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr>
  <td width="100%" align="center" height="17" background="{template_url}/images/button.gif" ><a href="{url_home}" style="text-decoration: none"><strong>HOME</strong></a></td>
 </tr>
 <tr>
 <td width="100%" align="center" height="17" background="{template_url}/images/button.gif" ><a href="{url_home}?template=FAQ" style="text-decoration: none"><strong>FAQ</strong></a></td>
 </tr>
 <tr>
 <td width="100%" align="center" height="17" background="{template_url}/images/button.gif" ><a href="{url_top_images}" style="text-decoration: none"><strong>TOP IMAGES</strong></a></td>
 </tr>
 <tr>
 <td width="100%" align="center" height="17" background="{template_url}/images/button.gif" ><a href="{url_new_images}" style="text-decoration: none"><strong>NEW IMAGES</strong></a></td>
 </tr>
 </table>
</div>
<br>

2_ IF LOGGED
____You want to have "MY ALBUM", in user_logininfo block, instead of "Lightbox".
Go to the lang/your_language/ (english, I suppose) directory, and edit the file "main.php"

Find:
Code: [Select]
//-----------------------------------------------------
//--- Lightbox ----------------------------------------
//-----------------------------------------------------
$lang['lightbox_no_images'] = "No images stored in your lightbox.";
$lang['lightbox_add_success'] = "Image added.";
$lang['lightbox_add_error'] = "Error adding image!";
$lang['lightbox_remove_success'] = "Image deleted from lightbox.";
$lang['lightbox_remove_error'] = "Error deleting image!";
$lang['lightbox_register'] = "In order to use the lightbox, you have to register.<br />&raquo; <a href=\"{url_register}\">Register now</a>";
$lang['lightbox_delete_success'] = "Lightbox deleted.";
$lang['lightbox_delete_error'] = "Error deleting lightbox!";
$lang['delete_lightbox'] = "Delete lightbox";
$lang['lighbox_lastaction'] = "Lightbox last updated:";
$lang['delete_lightbox_confirm'] = "Do you really want to delete the lightbox?";

//-----------------------------------------------------
//--- Misc --------------------------------------------
//-----------------------------------------------------
$lang['new'] = "new"; // Marks categories and images as "NEW"
$lang['home'] = "Home";
$lang['categories'] = "Categories";
$lang['sub_categories'] = "Subcategories";
$lang['lightbox'] = "Lightbox";

Change it to:
Code: [Select]
//-----------------------------------------------------
//--- Lightbox ----------------------------------------
//-----------------------------------------------------
$lang['lightbox_no_images'] = "No images stored in your album.";
$lang['lightbox_add_success'] = "Image added.";
$lang['lightbox_add_error'] = "Error adding image!";
$lang['lightbox_remove_success'] = "Image deleted from album.";
$lang['lightbox_remove_error'] = "Error deleting image!";
$lang['lightbox_register'] = "In order to use the album, you have to register.<br />&raquo; <a href=\"{url_register}\">Register now</a>";
$lang['lightbox_delete_success'] = "Album deleted.";
$lang['lightbox_delete_error'] = "Error deleting album!";
$lang['delete_lightbox'] = "Delete album";
$lang['lighbox_lastaction'] = "Album last updated:";
$lang['delete_lightbox_confirm'] = "Do you really want to delete the album?";

//-----------------------------------------------------
//--- Misc --------------------------------------------
//-----------------------------------------------------
$lang['new'] = "new"; // Marks categories and images as "NEW"
$lang['home'] = "Home";
$lang['categories'] = "Categories";
$lang['sub_categories'] = "Subcategories";
$lang['lightbox'] = "My Album";

3_ FOOTER

Here, you've got 6 custom links.
You can create 6 own template pages and call them as shown above.
Each link to each "own_template.html" should so be:
Code: [Select]
<a href={url_home}?template=own_template">Own_template</a>
Particular case: you may prefer use the Contact Form MOD, instead of a custom html template page.
If so, you will create a "core" php file called "contact.php".
To link to this page, proceed like KurtW said.

Open the file includes/page_header.php and find:
Code: [Select]
  "url_captcha_image" => $site_sess->url(ROOT_PATH."captcha.php"),Insert after:
Code: [Select]
  "url_contact" => $site_sess->url(ROOT_PATH."contact.php"),
In the template file "my_footer.html", you will call the contact page by this link:
Code: [Select]
<a href="{url_contact}">CONTACT US</a>
--> Optional: if you need to do a multilingual site, please do the modifications in your language file for links descriptions, as mentioned by KurtW.

Hope I was clear enough, and sorry again for this loss of time. It's also more difficult to explain clearly than to understand...

Offline nicky9

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Menu?
« Reply #18 on: May 10, 2008, 10:59:05 AM »
Thanks a lot for clarifying.

Still, I didn't understand the KurtW post about "therms" and loosing the session. Should I just ignore that or is there something of importance to understand about it?

By the way, I'm not going to use any contact forum, I'm going to use an ordinary e-mail address instead.

Offline † manurom

  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • manurom's 4images templates
Re: Menu?
« Reply #19 on: May 10, 2008, 11:15:50 AM »
Hi;
there was a confusion with your "terms" and "therms". Forget about it. The fault is ours as we didn't explain clearly enough. As I said before, explaining is more difficult than understanding.

In fact, to resume, each time you create a "core" PHP file, like "contact.php" or "terms.php", you will have to declare it's session URL in "includes/page_header.php" like in my previous post, so you can use {url_contact} or {url_terms} in your templates, keeping the user's session alive.

If you create only custom HTML template files, like "FAQ.html", simply use links like {url_home}?template=FAQ.

To use an ordinary e-mail contact link, use this:
Code: [Select]
<a href="mailto:my_address@my_isp.com?subject=My Site Feedback">Contact Us</a>
Replace "my_address@my_isp.com" by your own email address.
Replace "My Site Feedback" by the subject you want to be displayed in the mails you will receive.
« Last Edit: May 12, 2008, 02:59:41 PM by manurom »

Offline tanirtheone

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Menu?
« Reply #20 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