Welcome, Guest. Please Login or Register.
August 29, 2025, 01:10:06 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  |  English User Help  |  English Help  |  Profile Button « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Profile Button  (Read 479 times)
BlitzBoards
Noobie
*
Posts: 33


I'm a llama!

Profile Button
« on: April 20, 2002, 01:00:15 AM »
Reply with quote

I'm trying to create a custom menu bar on the top of my page. All of these buttons will be visible to both guests and users, and I want to include an "Edit Profile" button that brings the user to their profile and guests to an error screen. However, I can't seem to find a link that will bring the users directly to their profiles. Does anyone know how to do this? Thanks in advance.
Logged
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:Profile Button
« Reply #1 on: April 20, 2002, 01:36:52 AM »
Reply with quote

$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 = $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>"; }
      $yymenu .= "$menusep<a href=\"$cgi;action=logout\">$img[logout]</a>";
   }

thats the code for menu in subs.php! how you can see an guest can“t go to editprofil! if you will allow that change this code to

$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 = $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>$menusep<a href=\"$cgi;action=profile;user=$euser\">$img[profile]</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>"; }
      $yymenu .= "$menusep<a href=\"$cgi;action=logout\">$img[logout]</a>";
   }
now a guest can see login register and profil as button! only an example!
Logged

mainComm Dev Team
BlitzBoards
Noobie
*
Posts: 33


I'm a llama!

Re:Profile Button
« Reply #2 on: April 20, 2002, 01:38:15 AM »
Reply with quote

Here's basically what I'm trying to do. Create a profile link similar to the one on the top-right of this page: http://www.fftodayforums.com/cgi-bin/ultimatebb.cgi
Logged
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:Profile Button
« Reply #3 on: April 20, 2002, 01:40:23 AM »
Reply with quote

jip this is making my code above!
Logged

mainComm Dev Team
BlitzBoards
Noobie
*
Posts: 33


I'm a llama!

Re:Profile Button
« Reply #4 on: April 20, 2002, 02:08:07 AM »
Reply with quote

Quote from: mediman on April 20, 2002, 01:40:23 AMjip this is making my code above!

I believe you misunderstood my question. I want to create a text-based profile button that brings logged-in users to their own profile.
Logged
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:Profile Button
« Reply #5 on: April 20, 2002, 02:39:52 AM »
Reply with quote

no, but the code i posted, shows this button (well, if you want also a link) for both, guest and user!

to change the buttons to a text link only change in:

$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 = $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>$menusep<a href=\"$cgi;action=profile;user=$euser\">$img[profile]</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>"; }
      $yymenu .= "$menusep<a href=\"$cgi;action=logout\">$img[logout]</a>";
   }

all $img[xxxxx] to text!

btw: there is a option in "settings and preferences" textmenu instead buttonmenu!  
« Last Edit: April 20, 2002, 02:42:23 AM by mediman » Logged

mainComm Dev Team
BlitzBoards
Noobie
*
Posts: 33


I'm a llama!

Re:Profile Button
« Reply #6 on: April 20, 2002, 02:43:01 AM »
Reply with quote

I know, but I want to create it in the context of my own menu using HTML, not a php or such script.
Logged
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:Profile Button
« Reply #7 on: April 20, 2002, 03:00:19 AM »
Reply with quote

this is very difficult cause the username is needed to go to the profil! why not changing the template as your indexpage? inside this template you can use <yabb tags>!
Logged

mainComm Dev Team
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Profile 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.109 seconds with 20 queries.