SimplePortal

Customization => Themes and Graphics => Topic started by: msgoodygal on September 20, 2010, 01:51:17 PM

Title: Re: Help with forum button
Post by: msgoodygal on September 20, 2010, 01:51:17 PM
I'm totally a dweeb on this issue - I have tried the manual mods as outlined on this site, and when I uploaded my pages, my site became inaccessible and I got some kind of a parse error, that is Greek to me.  I had backed up the two files that I had changed, so got my site back in no time, but I still would REALLY like to use the portal, but I have NO BUTTON to link me to the main forum page. 

Sending out an S.O.S. 

I'm using smf 1.1.11, and using the antep-guhlin theme. 

Thanks!
Title: Re: Re: Help with forum button
Post by: Nathaniel on September 20, 2010, 08:24:07 PM
Split from the other topic.

Please attach your index.template.php file, including your attempts to add the forum button.
Title: Re: Help with forum button
Post by: msgoodygal on September 21, 2010, 12:20:07 AM
Hi Nathaniel!

Thanks! 

Here is my attempt:
Title: Re: Help with forum button
Post by: msgoodygal on September 21, 2010, 12:21:31 AM
Here is the original file from my theme:

Title: Re: Help with forum button
Post by: Nathaniel on September 21, 2010, 09:27:27 PM
Try the attached file.
Title: Re: Help with forum button
Post by: msgoodygal on September 21, 2010, 09:41:20 PM
I'll do that, thank you.  I can't do it yet, as my new site has more visitors than it has ever had....  my mods got to see the Simple Portal and LOVED it - and are begging me to get it up and running! 

I'll let you know!
Title: Re: Re: Help with forum button
Post by: Nathaniel on September 21, 2010, 10:31:44 PM
Well, you could always create a copy of your site (either online or on your local computer) then check to see if the new index.template.php file works there, before you upload it to your main site.
Title: Re: Help with forum button
Post by: msgoodygal on September 21, 2010, 10:32:40 PM
Oh great idea, I'll try that on one of my domains that I haven't put to use  yet! I'll let you know!
Title: Re: Help with forum button
Post by: msgoodygal on September 22, 2010, 01:32:52 AM
Ugh, NOooooo  It's not working.  I add SMF to another site that I have, and duplicated my theme and mods through a backup of my other database - then I FTP'd the file that you gave me over to it, and there is still no button to link back to the main forum from the portal.

Is there anything else that can be done?
Title: Re: Re: Help with forum button
Post by: Nathaniel on September 22, 2010, 01:43:05 AM
I had another look over the file, I can't see any issues with it. Do you get any parse errors?

Which Portal mode are you using? Make sure that you aren't using the 'Forum Integration' mode.

You could always check that the file is uploading alright as well, although that shouldn't be a problem.
Title: Re: Help with forum button
Post by: msgoodygal on September 22, 2010, 02:00:05 AM
I tried to upload it twice, and it didn't work.

I had it set to "front page"

No, no parse errors... 

I'll try again on my real site, as it's quiet now.


Title: Re: Help with forum button
Post by: msgoodygal on September 22, 2010, 02:06:06 AM
Hi...

 :-[  Well, I don't know what I did wrong on the other attempt - but this is working PERFECTLY NOW - thank you soooooooooooo much!!!!

 ;D
Title: Re: Re: Help with forum button
Post by: Nathaniel on September 22, 2010, 03:12:31 AM
I'm glad that you got it working.

Sometimes weird things happen with uploading/replacing files. I tend to purposely introduce parse errors into files that I suspect aren't being updated correctly. >:-D

Marked as solved.

Title: Re: Help with forum button
Post by: msgoodygal on September 22, 2010, 03:27:42 AM
Yup...  solved for sure and rockin on my site.....

check it out:  http://www.pennyauctionwatchdogs.com/index.php?www
Title: Re: Help with forum button
Post by: msgoodygal on March 30, 2011, 10:12:29 PM
Hi Nathaniel;

If you are still around, I could use your help again.  You had helped me to add a button to my theme so that I could used Simple Portal... It's been working perfectly since then, that is, until I upgraded smf.  I think that is what caused it, I didn't actually notice the timing of the error messages that I'm getting, and that's been the only change that I have made.

Anyway, I'm guessing that the error message that I'm getting has to do with the button, and wanted to know how to go about fixing it.  I'm getting hundreds of these errors every day:

8: Undefined index: extra_menu
File: **************watchdogs/Themes/gulhin-antep_theme/index.template.php
Line: 492

Any ideas????

Thanks!
Title: Re: Help with forum button
Post by: AngelinaBelle on March 31, 2011, 09:55:52 AM

That error message means you are trying to use an array element that you have not defined.
Have a look in index.template.php for extra_menu. What does that line look like there?
Title: Re: Help with forum button
Post by: msgoodygal on April 01, 2011, 10:03:57 PM
Hi AngelinaBelle;

Thanks for helping...

Here is what I have: 

// This is main menu
function template_extramenu()
{
   global $context, $settings, $options, $scripturl, $txt;
   
   $enable_extramenu = true;   // true or false
   
   if($enable_extramenu)
   {
      $extramenu = array(
         // Info         // Link
         'link 1'      => '<a href="http://www.pennyauctionwatchdogs.com/index.php?action=forum" title="Link Title">Forums</a>',
         'link 2'       => '<a href="mailto:admin@pennyauctionwatchdogs.com" title="Link Title">Contact Us</a>',
         );
      
      
      echo '
      <ul class="extramenu">
         <li><b>',$txt['extra_menu'],':</b></li>
         <li>' ,implode("</li><li> | </li><li>", $extramenu) ,'</li>
      </ul>';
   }

}




If that's not what you are referring to, let me know... I am not a coder, not even close.  Thanks!
Title: Re: Help with forum button
Post by: msgoodygal on April 04, 2011, 12:17:45 AM
Anyone?
Title: Re: Help with forum button
Post by: AngelinaBelle on April 04, 2011, 07:12:07 AM
Code: [Select]
         <li><b>',$txt['extra_menu'],':</b></li>
There's your problem right there.
$txt['extra_menu'] means there is an array called $txt, and I want to use the array element that is named 'extra_menu'. This only works if you have previously defined that array element. For example, if you look in your language files (the files in the language folder of your theme), you will see lots of examples of elements of the $txt array being set.
Somewhere, before you use this array element, you need to define it. The way it is done in the language files is just like
$txt['extra_menu']='extra menu';
If you wish to continue customizing with SMF, I highly recommend the HTML, CSS, and php tutorials at w3schools.com, as well as the documentation at php.net. You will learn a lot in  a short time that way.
Title: Re: Help with forum button
Post by: msgoodygal on April 07, 2011, 05:35:05 AM
Thanks for the info, but it doesn't help me to solve the problem. 

I'm not trying to customize anything, just trying to USE simple portal, and its giving me an error. 

I thought someone might be able to direct me on how to fix the error, since the only menu customization that I have done on SMF is related to the the Simple Portal menu button, which someone on here had previously helped me to get set up, and now, for whatever reason, its not working. 

I appreciate the the tips on where to go to learn it, but in the meantime,  its not helping to stop my visitors from getting error messages related to the Simple Portal extension. 

Is there someone who can give me instruction on how to fix THIS particular problem so that Simple Portal works without the error? 

Look, I'm an archaeologist, not an IT person.  I know a little html and css, but know nothing about PHP.  I hope I don't have to learn a whole new skill set just to be able to use this extension without error. 

I JUST NEED SOME HELP WITH HOW TO FIX A SPECIFIC ERROR, not a directive to learn PHP, where my attempts to fix it myself will only lead to WORSE errors and perhaps my whole site crashing. 

Thanks. 

Title: Re: Help with forum button
Post by: msgoodygal on May 06, 2011, 05:49:58 AM
Anyone?
Title: Re: Help with forum button
Post by: AngelinaBelle on May 06, 2011, 09:12:48 AM
Hi! I only accidentally found your topic, because it was marked solved earlier. So it did not show up on my "support radar".
I have marked it "unsolved", so I will see it in the future.
You are welcome to mark this issue "solved" or "unsolved" at any time.
Which version of SMF are you using now?
Title: Re: Help with forum button
Post by: msgoodygal on May 07, 2011, 02:24:42 AM
Thanks Angelina! 

I'm running version 1.1.13.

I wasn't aware that it was marked as being resolved, the thousands of error entries on my page for this prove otherwise, lol.

I appreciate the help!
Title: Re: Help with forum button
Post by: AngelinaBelle on May 10, 2011, 09:11:24 AM
Probably the topic got marked solved about the time you reported
Yup...  solved for sure and rockin on my site.....
I can understand your frustration with the problem.
This code is not part of SimplePortal. SimplePortal doesn't have a function template_extramenu.

That code must be there as part of some mod or custom theme. Presumably, that language string was supposed to be found in one of SMF's language files, or else in a new language file added by the theme or mod. I just don't know any more than that.
* Do you have this problem when you use the default theme (;theme=1)?
* If not, which theme is causing the problem?
Thanks
Title: Re: Help with forum button
Post by: msgoodygal on May 12, 2011, 10:02:40 PM
Well, the details are in the history of my posts here...

What had happened, was I had installed Simple Portal, only I had no button linking to the forums.  Someone from this forum helped me out, and gave me the code to write to my file so that I could use Simple Portal.

So it's that button that must be causing the problem, that is the only customize button that I use.
Title: Re: Help with forum button
Post by: AngelinaBelle on May 13, 2011, 12:03:00 PM
The fix will be straightforward, and it will not involve SimplePortal. It involves only your theme.
In your post http://simpleportal.net/index.php?topic=6485.msg37466#msg37466 (http://simpleportal.net/index.php?topic=6485.msg37466#msg37466) you attached a copy of index.template.php, which included a function template_extramenu:
Code: (in function template_extramenu) [Select]
// This is main menu
function template_extramenu()
{
 global $context, $settings, $options, $scripturl, $txt;
 
 $enable_extramenu = true; // true or false
 
 if($enable_extramenu)
 {
  $extramenu = array(
   // Info   // Link
   'link 1'  => '<a href="#" title="Link Title">Link 1</a>',
   'link 2'   => '<a href="#" title="Link Title">Link 2</a>',
   );
 
 
  echo '
  <ul class="extramenu">
   <li><b>',$txt['extra_menu'],':</b></li>
   <li>' ,implode("</li><li> | </li><li>", $extramenu) ,'</li>
  </ul>';
 }
}
Nathaniel did not make any changes to the part of the file that includes $txt['extra_menu'].
So I did a little research. I looked at your site. I see you are using the Antep theme.
I downloaded the Antep theme zip file. In the zip file I found a file, meant to go in the theme's Languages directory, called Modifications.english.php. There is also a Turkish version available.  That file contains:
Code: [Select]
<?php
global $txt;
$txt['extra_menu'] = 'Extra Menu';
?>
Do you still have that file in the Antep theme's Languages directory? Does it still contain $txt['extra_menu'] = 'Extra Menu';?
If that file is missing -- put it back. You can get a new copy from the zip file. If that file is there, but is missing that line, put that line back.  Then, of course, you will want to change that value to whatever you want.
Your site looks fine without it, so perhaps you want to put nothing at all between the to ' marks.
Title: Re: Help with forum button
Post by: msgoodygal on May 14, 2011, 07:52:35 PM
Woooo!   I think that is exactly the problem.  When looking at the current modifications.english.php file, there was nothing in it.  So, I downloaded the theme again, and uploaded the modifications file back to my site. 

So far, the error logs are clean, where as there had been almost 500 pages of that exact same error, received over the last 2 weeks.

THANK YOU!!!!!

I really appreciate the help!
Title: Re: Help with forum button
Post by: AngelinaBelle on May 16, 2011, 02:48:09 PM
I'm glad this problem is really solved this time.
Any mod (or, apparantly) theme is likely to use that file for its custom strings, so you may have to keep an eye on it.
SimplePortal 2.3.8 © 2008-2024, SimplePortal