Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2013, 11:03:23 am

Login with username, password and session length
Members
Total Members: 10768
Latest: CayoTTe
Stats
Total Posts: 32395
Total Topics: 5480
Online Today: 57
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 2
Guests: 48
Total: 50
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: PHP &XML Illerate.  (Read 5149 times)
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« on: October 01, 2006, 04:29:45 pm »

I just installed the new gallery lite mod and cant seem to figure out how to add the "gallery menu button" to my current theme,Which happens to be Purple Pod or <Pod_v1>.
Logged
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« Reply #1 on: October 01, 2006, 04:33:09 pm »

Ok so heres a copy of the Index.template.php file fr this theme. can anyone edit it for me so it shows the GALLERY link in the top menu?

Quote
            
      '; template_menu(); echo ' 

'; // user stuff echo ''; if (!empty($context['user']['avatar'])) echo '' . $context['user']['avatar']['image'].''; // If the user is logged in, display stuff like their name, new messages, etc. if ($context['user']['is_logged']) { echo ' ', $txt['hello_member'], ' ', $context['user']['name'], ''; // Only tell them about their messages if they can read their messages! if ($context['allow_pm']) echo '', $txt[152], ' ', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']; echo '.'; // Is the forum in maintenance mode? if ($context['in_maintenance'] && $context['user']['is_admin']) echo ' ', $txt[616], ''; // Are there any members waiting for approval? if (!empty($context['unapproved_members'])) echo ' ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' ', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], ' ', $txt['approve_members_waiting'], ''; // Show the total time logged in? if (!empty($context['user']['total_time_logged_in'])) { echo ' ', $txt['totalTimeLogged1']; // If days is just zero, don't bother to show it. if ($context['user']['total_time_logged_in']['days'] > 0) echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2']; // Same with hours - only show it if it's above zero. if ($context['user']['total_time_logged_in']['hours'] > 0) echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3']; // But, let's always show minutes - Time wasted here: 0 minutes Wink. echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], ''; } echo ' ', $txt['unread_since_visit'], '', $txt['show_unread_replies'], '', $context['current_time']; } // Otherwise they're a guest - so politely ask them to register or login. else { echo ' ', $txt['welcome_guest'], ' ', $context['current_time'], ' ', $settings['my_sidebar'] , ''; // Show a random news item? (or you could pick one from news_lines...) if (!empty($settings['enable_news'])) echo 'News', $context['random_news_line'], ''; // The "key stats" box. echo 'Stats', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], ' ', $txt[656], ': ', $context['common_stats']['latest_member']['link'], ' '; echo ' '.$context['current_time'].' '; } function template_main_below() { global $context, $settings, $options, $scripturl, $txt , $user_info , $modSettings; // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough. if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari']) { // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself. echo ' '; } echo '  '; theme_copyright(); // Show the load time? if ($context['show_load_time']) echo ' ', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], ''; echo 'Pod design by sloopz | XHTML | CSS | MySQL | PHP'; echo '  ';

echo '
   
';
}

// Show a linktree.  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
   global $context, $settings, $options;

   // Folder style or inline?  Inline has a smaller font.
   echo ' $tree)
   {
      // Show the | | |-[] Folders.
      if (!$settings['linktree_inline'])
      {
         if ($link_num > 0)
            echo str_repeat('', $link_num - 1), '';
         echo '  ';
      }

      // Show something before the link?
      if (isset($tree['extra_before']))
         echo $tree['extra_before'];

      // Show the link, including a URL if it should have one.
      echo '', $settings['linktree_link'] && isset($tree['url']) ? '' . $tree['name'] . '' : $tree['name'], '';

      // Show something after the link...?
      if (isset($tree['extra_after']))
         echo $tree['extra_after'];

      // Don't show a separator for the last one.
      if ($link_num != count($context['linktree']) - 1)
         echo $settings['linktree_inline'] ? '  |  ' : '';
   }

   echo '';
}

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Show the [home] and [help] buttons.
   echo '
            ', ($settings['use_image_buttons'] ? '' : $txt[103]), '', $context['menu_separator'], '
            ', ($settings['use_image_buttons'] ? '' : $txt[119]), '', $context['menu_separator'];

   // How about the [search] button?
   if ($context['allow_search'])
      echo '
            ', ($settings['use_image_buttons'] ? '' : $txt[182]), '', $context['menu_separator'];

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
            ', ($settings['use_image_buttons'] ? '' : $txt[2]), '', $context['menu_separator'];

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '
            ', ($settings['use_image_buttons'] ? '' : $txt[467]), '', $context['menu_separator'];

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
            ', ($settings['use_image_buttons'] ? '' : $txt['calendar24']), '', $context['menu_separator'];

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '
            ', ($settings['use_image_buttons'] ? '' : $txt[34]), '', $context['menu_separator'], '
            ', ($settings['use_image_buttons'] ? '' : $txt[97]), '';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '
            ', ($settings['use_image_buttons'] ? '' : $txt[108]), '';
}

// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
   global $settings, $buttons, $context, $txt, $scripturl;

   if (empty($button_strip))
      return '';

   // Create the buttons...
   foreach ($button_strip as $key => $value)
   {
      if (isset($value['test']) && empty($context[$value['test']]))
      {
         unset($button_strip[$key]);
         continue;
      }
      elseif (!isset($buttons[$key]) || $force_reset)
         $buttons[$key] = '

Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #2 on: October 01, 2006, 04:43:25 pm »

Doesn't seem to be the complete file and it missing parts of the code. Try to attach the file to this post.
Logged
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« Reply #3 on: October 01, 2006, 04:52:45 pm »

Not knowing which one is what you need I attached the index.temp, the 'boardindex.temp, and the display.temp. All from the particular theme I'm usings root directory.

Thanks for you help
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #4 on: October 01, 2006, 05:22:53 pm »

File attached
Logged
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« Reply #5 on: October 01, 2006, 05:46:53 pm »

Works great thanks much. but the link shows up as a broken pic link once I create the button. what do I name it? so the code finds it in themes/images?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #6 on: October 01, 2006, 06:06:40 pm »

gallery.gif you need to copy it to your themes folder.
Logged
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« Reply #7 on: October 01, 2006, 06:44:01 pm »

THanks.

OK I now have the same 'No button link for SMF links. I tried copying the line you added and replaceing gallery with the word link? but no help. whats the code line I need to add for SMF Links.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #8 on: October 01, 2006, 06:46:45 pm »

Try this
Code:
echo '
<a href="', $scripturl, '?action=gallery">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/links.gif" alt="Links" style="margin: 2px 0;" border="0" />' : 'Links'), '</a>', $context['menu_separator'];
Logged
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« Reply #9 on: October 01, 2006, 07:13:34 pm »

OK heres what I tryed to do to get SMF links to work and show up in the menu bar.
Logged
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« Reply #10 on: October 04, 2006, 08:41:29 pm »

OK none of that worked could you help me out and re-write the index file so that the following MODS show appropreatly in this Theme Pod_v1?

SMF LINKS
SMF GALLERY (DONE THANX) Whens Pro gonna be ready?
Simple Blogs
Also the PayPal Donation button isn't showing up in this theme if you could make that worrk to I'd Be most appericative.

angus

file attached.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #11 on: October 04, 2006, 08:48:06 pm »

Pro is ready now. I just finishing off some things on the site then will annouce it.

I can fix links button other ones I am not familar with
Logged
Me_angus
Inline PM Customer
*****
Offline Offline

Posts: 39



View Profile WWW
« Reply #12 on: October 04, 2006, 09:22:27 pm »

Thanks works great, PM me or shoot me an e-mail when Gallery Pro is avaliable.

Angus
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 23, 2013, 08:29:56 pm]

[May 23, 2013, 04:50:21 am]

[May 22, 2013, 10:03:30 pm]

[May 22, 2013, 03:00:09 pm]

[May 22, 2013, 03:03:31 am]

[May 21, 2013, 03:27:16 pm]

[May 21, 2013, 02:11:10 pm]

[May 21, 2013, 01:18:58 pm]

[May 21, 2013, 12:22:02 am]

[May 21, 2013, 12:20:41 am]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 1.216 seconds with 22 queries.