Welcome, Guest. Please Login or Register.
March 28, 2024, 08:05:45 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  Calendar button « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Calendar button  (Read 55020 times)
rcmedia
Noobie
*
Posts: 10


I'm a llama!

Calendar button
« on: February 25, 2004, 09:17:35 PM »
Reply with quote

The default 'calendar' button on the top horizontal menu in our Yabbse 1.5.4 forum is only visable if you are logged in (*i.e. casual viewers who are either not registered forum members or members who are not logged in) to the forum.

We have seen other yabbse forums where the calendar button is visable on first visit with no membership/log-in.

How do we do that exactly?

Thanks in advance.

Rob
Logged
Fizzy
Full Member
***
Posts: 214


Re:Calendar button
« Reply #1 on: February 26, 2004, 08:02:47 PM »
Reply with quote

try moving the following in Subs.php


      if ($modSettings['cal_enabled'] == 1)
         $yymenu .= "$menusep<a href=\"$scripturl?action=calendar\">$img[calendar]</a>";

from current location and add it where ever you want the button to appear between


   if ($username == 'Guest'){
      $yymenu .= "$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>";
      $yymenu .= "$menusep<a href=\"$scripturl\">$img[home]</a>";
      $yymenu .= "$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>";    
      $yymenu .= "$menusep<a href=\"$cgi;action=login\">$img[login]</a>";
      $yymenu .= "$menusep<a href=\"$cgi;action=register\">$img[register]</a>";
      }



Example


   if ($username == 'Guest'){
      $yymenu .= "$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>";
      $yymenu .= "$menusep<a href=\"$scripturl\">$img[home]</a>";
      $yymenu .= "$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>";    
  if ($modSettings['cal_enabled'] == 1)
         $yymenu .= "$menusep<a href=\"$scripturl?action=calendar\">$img[calendar]</a>";
      $yymenu .= "$menusep<a href=\"$cgi;action=login\">$img[login]</a>";
      $yymenu .= "$menusep<a href=\"$cgi;action=register\">$img[register]</a>";
      }
« Last Edit: February 26, 2004, 08:05:20 PM by Fizzy » Logged
northyabber
Noobie
*
Posts: 7


Chilly chicken

Re:Calendar button
« Reply #2 on: March 06, 2004, 06:20:01 PM »
Reply with quote

Great  ;D

This is what I was looking for...

But I can't seem to add the calendar statement in the right place...  because if I do, then it cuts out the profile and admin buttons from the administrator (me!).

I stuck it before and after the guest login/register statement...and that created my problem.

What else can I change to enable that calendar button to always be visible whether logged in or out, admin or guests??  

This is what I currently have...

Quoteif ($modSettings['disableCaching'] == 1)
   {
   header("Cache-Control: no-cache, must-revalidate");
   header("Pragma: no-cache");
   }

   $yymenu = "<a href=\"$scripturl\">$img[home]</a>
$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>
$menusep<a href=\"$cgi;action=search\">$img[search]</a>";
   if ($settings[7] == 'Administrator')
      $yymenu .= "$menusep<a href=\"$cgi;action=admin\">$img[admin]</a>";
   if ($username == 'Guest')
         
         $yymenu .= "$menusep<a href=\"$cgi;action=login\">$img[login]</a>
$menusep<a href=\"$cgi;action=register\">$img[register]</a>";
      
   else
   {
      $euser = urlencode($username);
      $yymenu .= "$menusep<a href=\"$cgi;action=profile;user=$euser\">$img[profile]</a>";
      if ($enable_notification)
         $yymenu .= "$menusep<a href=\"$cgi;action=shownotify\">$img[notification]</a>";
   if ($modSettings['cal_enabled'] == 1)
         $yymenu .= "$menusep<a href=\"$scripturl?action=calendar\">$img[calendar]</a>";
      $yymenu .= "$menusep<a href=\"$cgi;action=logout;sesc=" . session_id() . "\">$img[logout]</a>";
   }
Logged
Fizzy
Full Member
***
Posts: 214


Re:Calendar button
« Reply #3 on: March 20, 2004, 01:27:16 PM »
Reply with quote

Sorry for the delay in getting back.

In subs.php check to make sure you have something along the lines of

   if ($username == 'Guest'){
      $yymenu .= "$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>";
      $yymenu .= "$menusep<a href=\"$scripturl\">$img[home]</a>";
      $yymenu .= "$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>";    
      $yymenu .= "$menusep<a href=\"http://www.domain/gallery/\" target=\"_blank\">$img[gallery]</a>";
      $yymenu .= "$menusep<a href=\"$cgi;action=login\">$img[login]</a>";
      $yymenu .= "$menusep<a href=\"$cgi;action=register\">$img[register]</a>";
      }

   if ($username != 'Guest')
   {
      $euser = urlencode($username);
      $yymenu .= "$menusep<a href=\"$scripturl\">$img[home]</a>";
      $yymenu .= "$menusep<a href=\"$helpfile\" target=\"_blank\">$img[help]</a>";
          $yymenu .= "$menusep<a href=\"$cgi;action=search\">$img[search]</a>";
      $yymenu .= "$menusep<a href=\"$cgi;action=profile;user=$username\">$img[editprofile]</a>";
     if ($modSettings['mlpEnabled'] == '1')
      $yymenu .= "$menusep<a href=\"$cgi;action=mlall\">$img[memberlist]</a>";
     if ($modSettings['membermapEnabled'] == '1')
      $yymenu .= "$menusep<a href=\"$cgi;action=mmview\">$img[memmap1]</a>";
      if ($modSettings['who_enable'] && (($username == 'Guest' && $modSettings['who_view'] == 0) || ($username != 'Guest' && $modSettings['who_view'] <= 1) || $settings[7] == 'Global Moderator' || $settings[7] == 'Administrator'))
   {
      $yymenu .= "$menusep<a href=\"$cgi;action=who\">$img[whosonline]</a>";
   }
     if ($modSettings['chatEnabled'] == '1')
      $yymenu .= "$menusep<a href=\"http://chat.domain/\" target=\"_blank\">$img[chat2]</a>";
      if ($enable_notification)
         $yymenu .= "$menusep<a href=\"$cgi;action=shownotify\">$img[notification]</a>";
      if ($modSettings['cal_enabled'] == 1)
         $yymenu .= "$menusep<a href=\"$scripturl?action=calendar\">$img[calendar]</a>";
      $yymenu .= "$menusep<a href=\"http://www.domain/gallery/\" target=\"_blank\">$img[gallery]</a>";      
      $yymenu .= "$menusep<a href=\"$cgi;action=logout;sesc=" . session_id() . "\">$img[logout]</a>";
   }

If you're using 800x600 display then then buttons you said were missing should just drop down to the next line
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  Calendar button « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.026 seconds with 19 queries.