News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

GanericMenu.Template.php // Print out all the items in this tab

Started by T3CHN0, October 07, 2010, 11:05:02 AM

Previous topic - Next topic

T3CHN0

Hello

My log is showing an error on line 320 in the GanericMenu.Template.php
could anyone tell me what this error is and is it safe to just remove the line

I included everything from (// Print out all the items in this tab) as I noticed it's in there 2 times
from the bottom of the file.


        // Print out all the items in this tab.
        foreach ($tab_context['tabs'] as $sa => $tab)
        {
            if (!empty($tab['disabled']))
                continue;

            if (!empty($tab['is_selected']))
            {
                echo '
                        <li class="active', !empty($tab['is_last']) ? ' last' : '', '">
                            <a href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">
                                <span>
                                    <em>', $tab['label'], '</em>
                                </span>
                            </a>
                        </li>';
            }
            else
                echo '
                        <li', !empty($tab['is_last']) ? ' class="last"' : '', '>
                            <a href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">
                                <span>', $tab['label'], '</span>
                            </a>
                        </li>';
        }
294:
295:        // the end of tabs
296:        echo '
297:                    </ul>
298:                </div><br />
299:            </div>';
300:       foreach ($tab_context['tabs'] as $sa => $tab)   
301:       {   302:          if (!empty($tab['disabled']))   
303:             continue;   304:
305:          if (!empty($tab['is_selected']))   306:          {   
307:             echo '   
308:                   <li class="active', !empty($tab['is_last']) ? ' last' : '', '">   
309:                      <a href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">   
310:                         <span>   
311:                            <em>', $tab['label'], '</em>   
312:                         </span>   
313:                      </a>   
314:                   </li>';   
315:          }   
316:          else   
317:             echo '   
318:                   <li', !empty($tab['is_last']) ? ' class="last"' : '', '>   
319:                      <a href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">
==>320:                         <span>', $tab['label'], '</span>   
321:                      </a>   
322:                   </li>';   
323:       } 
324:
325:       // the end of tabs   
326:       echo '   
327:                </ul>   
328:             </div><br />   
329:          </div>';   
330:    }   
331:    // ...if not use the old style   
332:    else   
333:    {   
334:       echo '   
335:             <div class="windowbg padding">';   
336:
337:       // Print out all the items in this tab.   
338:       foreach ($tab_context['tabs'] as $sa => $tab)   
339:       {   
340:          if (!empty($tab['disabled']))
341:                continue;
342:
343:            if (!empty($tab['is_selected']))
345:            {
346:                echo '
347:                    <img src="', $settings['images_url'], '/selected.gif" alt="*" /> <strong><a href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . 348:    ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], '">', $tab['label'], '</a></strong>';
349:            }
350:            else
351:                echo '
352:                    <a href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa,
353:      $menu_context['extra_parameters'], '">', $tab['label'], '</a>';
354:
355:            if (empty($tab['is_last']))
356:                echo ' | ';
357:        }
358:
359:        echo '
360:                </div>
361:                <div class="windowbg smalltext padding">
                    ', isset($selected_tab['description']) ? $selected_tab['description'] : $tab_context['description'], '
                </div>
            </div>
        </div>';
    }
}

?>



Or do I remove everything from the 2nd (// Print out all the items in this tab) all the way down to     } }  ?>

I have also included a pic of how it looks in my log error report encase it will help in anyway.
just click on the pic to make it bigger.

thankyou

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

Alex' Manson

QuoteSo, what's the error?
he said that he has an error in the error log and needs help to solve it, he included the picture of the line the error log says it's broken.

T3CHN0

Quote
error on line 320 in the GanericMenu.Template.php
==>320:                         <span>', $tab['label'], '</span>   
Thats the error!!!

xenovanis

That's it? There should be more to that.

Please post back the complete errormessage.
"Insanity: doing the same thing over and over again and expecting different results."

T3CHN0

I posted everything I could in my first post...
I don't anymore. Just wanted to know if I could remove the string from my php

xenovanis

Well, I'm not sure it's save to remove. I'd say, backup the file and try it.

Is this part of your custom theme?
"Insanity: doing the same thing over and over again and expecting different results."

T3CHN0


BlackRain2 Theme

OK I will backup first & delete that but before I do. what does (Print out all the items in this tab) really do?
I can do Ctl-P and will print the page anywhere I like. so what is (Print out all the items in this tab) used for!!!
and should there be a button to click to print Maybe?

xenovanis

Well, it's about echoing/printing the menu in your forum. Have you tried asking this in the support topic for the theme then? The author might be able to help you out with the error. Which is still incomplete, for all I can see. Is it a parse error, an undefined error, .. ?
"Insanity: doing the same thing over and over again and expecting different results."

DoctorMalboro

I think there's an error because it's not closed/open properly the echo in that line...

Aleksi "Lex" Kilpinen

Hi techno489, is this still an issue? Have you had any luck with this?

What xenovanis was probably trying to say, is that we would appreciate if you could see your forums error log, and copy / paste the whole error message you got. Now you only let us know of what line and file the error pointed at, but no actual error.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

T3CHN0

I don't know to be honest, I have moved on & forgot about it.
I will keep an eye on the error log and post as soon as i see it again
thanks

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: