SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 23, 2012, 11:05:42 am

Login with username, password and session length
Members
Total Members: 10069
Latest: tetsujrock
Stats
Total Posts: 28682
Total Topics: 4975
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 87
Total: 87
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: New Gallery Installation  (Read 4610 times)
allwinners
Newbie
*
Offline Offline

Posts: 5


View Profile
« on: May 23, 2008, 04:07:34 am »

Hi there,
I am new here and to the whole SMF (Gallery) thing, and I am having what seems to be a common problem understanding what is required to add a gallery button/link to my custome SMF theme. I am using the cs-dk115v1 theme. I did copy an existing button code in the index.template.php file and I did see the new button on the main menu. However when I changed the 'calendar' tags to 'gallery' the button disappeared from the menu bar. I then deleted the changes I had made and reverted back to the standard .php file.

Secondly, the permissions for the gallery do not show up in my permissions area. I have seen new space added in the area, but all lines are blank. The same problem has occured when I attempted to install 'arcade' onto the forum.

Do I add - http://mysite.com/forum/index.php?action=gallery - where the standard command line simply says 'action==[calendar]' etc??\

I seem to have worked this out EXCEPT: - I cant seemt o change the label/button text without making it disappear. I am assuming that this is the code I need to adjust $txt['calendar24'] - because it is the only code for this button that still refers to 'calendar'

Any help would be greatly appreciated.
« Last Edit: May 23, 2008, 04:48:04 am by allwinners » Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« Reply #1 on: May 23, 2008, 07:11:13 am »

You can change $txt['calendar24']  to 'Gallery' and that will make the Gallery tet appear instead. Each custom theme is a little different.
Logged
allwinners
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #2 on: May 23, 2008, 09:19:59 am »

You can change $txt['calendar24']  to 'Gallery' and that will make the Gallery tet appear instead. Each custom theme is a little different.

Hi - thanks for that but I did try this and the button disappeared from the menu bar. Left a blank button/space instead. I will give it another try and see what happens....
Logged
allwinners
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #3 on: May 23, 2008, 09:26:57 am »

Yeah I tried this again and it removed the text and reduced the size of the button.

This is the code for the button, that I ahve entered..


// The [gallery]!
   if ($context['allow_calendar'])
      echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '' : '' , '
            <div class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=gallery">' , $txt['Gallery'] , '</a>
            </div>' , $current_action == 'gallery' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« Reply #4 on: May 23, 2008, 07:27:40 pm »

Just do
Code:
// The [gallery]!
   if ($context['allow_calendar'])
      echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '' : '' , '
            <div class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=gallery">Gallery</a>
            </div>' , $current_action == 'gallery' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';
Logged
allwinners
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #5 on: May 23, 2008, 10:36:14 pm »

Just do
Code:
// The [gallery]!
   if ($context['allow_calendar'])
      echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '' : '' , '
            <div class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=gallery">Gallery</a>
            </div>' , $current_action == 'gallery' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';

Thanks I will give this a try...
Logged
allwinners
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #6 on: May 23, 2008, 10:42:58 pm »

Just do
Code:
// The [gallery]!
   if ($context['allow_calendar'])
      echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '' : '' , '
            <div class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=gallery">Gallery</a>
            </div>' , $current_action == 'gallery' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';

Fantastic - this worked a treat - thankyou! Do you know why the permissions would not be showing up in the permissions section!? It seems to have created a space for them (like a table listing) but there are no permission options available at all.....

This following code was listed in the install.gallery.php file, and I am wondering if this is just standard text contained within the file, or if it is actually an error report telling me that the files were not installed correctly.....

I have checked my cpanel and there is no install.gallery.php file in the main root directory where index.php and ssi.php are located. The only place where this install.gallery.php file still resides is in the .zip package file in /packages....??

Here is the code..

//Install the Database tables for SMF Galleryif (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))  require_once(dirname(__FILE__) . '/SSI.php');// Hmm... no SSI.php and no SMF?elseif (!defined('SMF'))  die('<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');
« Last Edit: May 23, 2008, 10:54:23 pm by allwinners » Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]

[May 17, 2012, 12:38:16 pm]

[May 15, 2012, 09:32:27 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
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 0.235 seconds with 20 queries.