Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Topic started by: charlottezweb on April 04, 2004, 03:01:16 AM

Title: question about error in converted theme
Post by: charlottezweb on April 04, 2004, 03:01:16 AM
I have a dropdown menu that I have all of my typical YSE/SMF commands in so that I can keep a list of common commands in a compact place without using a graphical menu.

When the SMF upgrade converted the theme (which worked surprisingly well by the way!) I'm now getting an error for the action=profile.

Previously I would just link to action=profile and that worked fine.  Likewise, on my newly upgraded SMF, I can add action=profile without problems to the end of my index in a browser and it works fine.

However, the converter added a little string to use the username in my converted theme:

Quoteindex.php?action=profile;user=<?php echo $username; echo '">

When you view the page, the dropdown menu is hugely distorted horizontally (expands the menu due to the message) due to the following message with the "view profile" option:

Quote
notice: undefined variable: username in (the whole path)/index.template.php on line 431

line 430 and 431 is this:
Quote
// If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])

To make things weirder, if I delete the whole profile option from the menu, the whole theme won't display and says there's an error.  Does smf require that to be there or something?  I can't explain that at all.  If i delete that one whole menu choice, the theme fails.

Any ideas?

TIA,
-Jason
Title: Re: question about error in converted theme
Post by: [Unknown] on April 04, 2004, 03:39:45 AM
Find:

index.php?action=profile;user=<?php echo $username; echo '">

Replace:

index.php?action=profile

You used to need the username on the URL in YaBB SE.  The converter didn't add that, it just didn't remove it.

-[Unknown]
Title: Re: question about error in converted theme
Post by: charlottezweb on April 04, 2004, 10:47:49 AM
Quote from: [Unknown] on April 04, 2004, 03:39:45 AM
Find:
index.php?action=profile;user=<?php echo $username; echo '">

Replace:
index.php?action=profile

I already tried that initially.  I've copied the syntax from the other examples and the whole theme won't load if I alter that part. Here's an example of what will work (well, it will display the page but distort the menu). I've included the options above and below to show how the syntax is setup. 


<option value=\"http://www.xxxxx.com/xxxxx/index.php?action=register\">&nbsp;&nbsp;&nbsp;&nbsp;- create account

<option value=\"http://www.xxxxx.com/xxxxx/index.php?action=profile;user=<?php echo $username;
echo '">&nbsp;&nbsp;&nbsp;&nbsp;- view my profile

<option value="http://www.xxxxx.com/xxxxx/index.php?action=shownotify">&nbsp;&nbsp;&nbsp;&nbsp;- set notifications


If I do anything it seems to break the theme.  But I've tried making the profile line like these and it still doesn't work:


<option value=\"http://www.xxxxx.com/xxxxx/index.php?action=profile">&nbsp;&nbsp;&nbsp;&nbsp;- view my profile

or

<option value=\"http://www.xxxxx.com/xxxxx/index.php?action=profile\">&nbsp;&nbsp;&nbsp;&nbsp;- view my profile


And like I said, if I remove the line entirely, the theme won't work either and that dropdown menu doesn't specify any count or reason why removing an item wouldn't fail unless SMF is requiring that option be there.  This adds to my confusion.  :)

I'm I overlooking something simple?

-Jason
Title: Re: question about error in converted theme
Post by: [Unknown] on April 04, 2004, 10:51:38 AM
Can you just email me the file?  I can fix it easily that way...

-[Unknown]
Title: Re: question about error in converted theme
Post by: charlottezweb on April 04, 2004, 05:37:35 PM
Quote from: [Unknown] on April 04, 2004, 10:51:38 AM
Can you just email me the file?  I can fix it easily that way...

-[Unknown]

email sent.  Thanks!!