Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 230
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 201
Total: 201

Author Topic: help with Gallery link in custom theme  (Read 20944 times)

0 Members and 1 Guest are viewing this topic.

Offline j3cubcapt

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: help with Gallery link in custom theme
« Reply #15 on: September 27, 2007, 11:59:56 am »
Great, here is the file if you can help I would really be thankful!

Will

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: help with Gallery link in custom theme
« Reply #16 on: September 27, 2007, 01:55:22 pm »
Try this file
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline j3cubcapt

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: help with Gallery link in custom theme
« Reply #17 on: September 27, 2007, 04:24:39 pm »
Thank you for supporting your paid customers so well!  ;D

Will

Offline astring

  • Member
  • *
  • Posts: 5
    • View Profile
Re: help with Gallery link in custom theme
« Reply #18 on: January 22, 2008, 04:35:25 pm »
sorry for the redundant question, but i am having the same "missing gallery button" issue with blackrainV2.  Will the code above also work on the blackrainv2 index.template.php theme?  I'm also using the tinyportal mod on this site http://wtriders.com
« Last Edit: January 22, 2008, 04:45:26 pm by astring »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: help with Gallery link in custom theme
« Reply #19 on: January 22, 2008, 09:11:14 pm »
Each theme is a little different but just requires a button/link inside index.template.php
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline astring

  • Member
  • *
  • Posts: 5
    • View Profile
Re: help with Gallery link in custom theme
« Reply #20 on: January 23, 2008, 09:03:09 am »
Thanks for the quick reply.  I added the script for the gallery button (see example below) but must have missed somehhing because no button showed up.  (yes i did backup the origional index.template.php, and yes i used copy/paste to duplicate the calendar button script, then edit the duplicate to show the gallery button.  I've included the edited code below.  Can you see where I missed something? (the added lines are right below the calendar).   When i manually enter http://wtriders.com/wtradmin/index.php?action=gallery the galery does show, so the only thing thats not working is getting the button to show up.

Code: [Select]
echo '<div id="tabs6">';

// How about the [home] button?
echo '<ul><li><a href="', $scripturl, '"><span>'.$txt[103].'</span></a></li>';

  if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo '<li><a href="', $scripturl, '?action=forum"><span>'.$txt['tp-forum'].'</span></a></li>';

// How about the [help] button?
echo '<li><a href="', $scripturl, '?action=help" ><span>', $txt[119], '</span></a></li>';

// How about the [search] button?
if ($context['allow_search'])
echo '<li><a href="', $scripturl, '?action=search"><span>', $txt[182] , '</span></a></li>';

// Is the user allowed to administrate at all? ([admin])
  if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin"><span>', $txt[2], '</span></a></li>';
 
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile"><span>', $txt[467], '</span></a></li>';

// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar"><span>', $txt['calendar24'], '</span></a></li>';

// The [Gallery]!
if ($context['allow_Gallery'])
echo '<li><a href="', $scripturl, '?action=gallery"><span>', $txt['smfgallery_menu'], '</span></a></li>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';

// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '<li><a href="', $scripturl, '?action=login"><span>', $txt[34], '</span></a></li>
  <li><a href="', $scripturl, '?action=join"><span>', $txt[97], '</span></a></li>';
}
// Otherwise, they might want to [logout]...
else
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>', $txt[108], '</span></a></li>';
  echo '</ul></div>';
}

// 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] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';

$button_strip[$key] = $buttons[$key];
}

echo '
<td ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}

?>
« Last Edit: January 23, 2008, 09:12:22 am by astring »

Offline Ken.

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 113
  • TP Rules!
    • View Profile
Re: help with Gallery link in custom theme
« Reply #21 on: January 23, 2008, 09:53:18 am »
Whenever you need to add a button or link to a custom theme its usually best to go to the source for that theme because there are lots of different coding styles that can be used.

For the 'B l a c k - R a i n V.2 by C r i p ~' you can find the topic for the theme HERE.
You can also find a good article on how to add theme buttons HERE.

Offline astring

  • Member
  • *
  • Posts: 5
    • View Profile
Re: help with Gallery link in custom theme
« Reply #22 on: January 23, 2008, 06:07:02 pm »
The issue is resolved, thanks for the help :)

Offline j3cubcapt

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: help with Gallery link in custom theme
« Reply #23 on: March 18, 2009, 11:39:35 am »
You guys were nice enough to help me add the "View Gallery" link in my custom theme. Can someone help me removing it?

Thanks
Will

Offline chippy

  • Member
  • *
  • Posts: 2
    • View Profile
Re: help with Gallery link in custom theme
« Reply #24 on: March 25, 2009, 02:10:57 am »
Sorry to say I'm having the same problem with the Gallery link in custom theme I'm using Brkdmrcn V3 could you work your majic with the attached file please

Thank you

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: help with Gallery link in custom theme
« Reply #25 on: March 25, 2009, 07:56:08 am »
Fixed file attached
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline chippy

  • Member
  • *
  • Posts: 2
    • View Profile
Re: help with Gallery link in custom theme
« Reply #26 on: March 25, 2009, 02:11:16 pm »
Fixed file attached

Many thanks, simple when you know how, knowledge is a wonderfull thing......Great turn round time keep the modds coming would certainly use you again 8) ;D

Offline lego

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: help with Gallery link in custom theme
« Reply #27 on: March 30, 2009, 02:14:10 pm »
Well Can I bug you too....  ;D

I have tried to make it work but I'm a bit slow at this... Think you can help me? I have attached a copy of my back up.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: help with Gallery link in custom theme
« Reply #28 on: March 31, 2009, 09:52:32 am »
Fixed file attached
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline lego

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: help with Gallery link in custom theme
« Reply #29 on: March 31, 2009, 12:39:45 pm »
Thanks for the super fast reply!! But that didn't work for some reason... I cleared the cache and tried but it doesn't show the link. Any ideas what I can try on my side?

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
7100 Views
Last post September 14, 2006, 01:20:31 pm
by SMFHacks
1 Replies
4138 Views
Last post February 24, 2007, 08:28:22 pm
by SMFHacks
3 Replies
5622 Views
Last post June 28, 2007, 09:36:48 pm
by SMFHacks
1 Replies
3349 Views
Last post July 05, 2007, 08:14:49 am
by SMFHacks
5 Replies
8362 Views
Last post January 19, 2008, 09:35:38 am
by madeupmedia

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal