TinyPortal

Development => Support => Installation => Topic started by: bas123 on April 12, 2008, 02:55:28 AM

Title: Forum Link plus Ad Mod issue.
Post by: bas123 on April 12, 2008, 02:55:28 AM
I recently installed SMF 1.1.4 | SMF with the Tolkien Theme.

I have redesigned the header graphics and adjusted style.css to conform with the color theme.

I was unable to figure out how to activate the "Forum" link in the top left 'text link' style menu however.

The only resolution I could come with (and I know it's wrong as the link converts to bold on the forum index only, but on all other forum > pages, the "Home" link is bolded), was to make the following adjustment on approx line 593 of the index.template.php file.

Here's the sub (inc'l my chg:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'managegames', 'arcadesettings', 'arcadecategory', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('gallery','search', 'arcade', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'globalAnnouncementsAdmin')
$current_action = 'admin';

if ($context['current_action'] == 'search2')
$current_action = 'search';

if (isset($_GET['dl']))
$current_action = 'dlmanager';

if ((isset($_GET['board']) || isset($_GET['topic'])) && empty($settings['use_tp']))
$current_action = 'home';
elseif ((isset($_GET['board']) || isset($_GET['topic'])) && !empty($settings['use_tp']))
$current_action = 'forum';

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

// Begin SMFShop code
if ($context['current_action'] == 'shop')
$current_action = 'shop';
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory', 'shop_restock', 'shop_usergroup')))
$current_action = 'admin';
// End SMFShop code

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

// Show the start of the tab section.
echo '<ul id="menubox">
<li class="m1"><a' , $current_action=='home' ? ' class="chosen"' : '' , ' href="', $scripturl, '">' , $txt[103] , '</a></li>';
// TP "I MOVED THIS LINE TO COMMENT SO FORUM LINK WOULD SHOW"  if (!empty($settings['use_tp']))

echo '<li class="m4"><a' , $current_action=='forum' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=forum">' , $txt['tp-forum'] , '</a></li>';

echo '
<li class="m3"><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
if ($context['allow_search'])
echo '<li class="m4"><a' , $current_action=='search' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=search">Search</a></li>';
if ($context['allow_calendar'])
echo '<li class="m1"><a' , $current_action=='calendar' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
if ($context['allow_admin'])
echo '<li class="m2"><a' , $current_action=='admin' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
if ($context['user']['is_guest'])
echo '<li class="m4"><a' , $current_action=='login' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
if ($context['user']['is_guest'])
echo '<li class="m3"><a' , $current_action=='register' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
if ($context['allow_edit_profile'])
echo '<li class="m1"><a' , $current_action=='profile' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';

// SMF Arcade
if (!empty($settings['use_arcade']))
echo '<li class="m4"><a' , $current_action=='arcade' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a></li>';
// SMF Gallery
if (!empty($settings['use_smfgallery']))
echo '<li class="m2"><a' , $current_action=='gallery' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu'] , '</a></li>';
// SMFshop
if (!empty($settings['use_shop']))
echo '<li class="m1"><a' , $current_action=='shop' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=shop">Shop</a></li>';

if ($context['user']['is_logged'])
echo '<li class="m5"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '
</ul>';

}


Did I miss something in the admin that would activate the link? Or what do I do to resolve this?





I added the mod, and it shows up in my Packages Manager, but here's the options:
Ad Managment 2.3.3  [ List Files ] [ Delete ] 
Isn't there supposed to be an install link? - Actually, I believe there was one before, but when I tried it, I got an error saying it wasn't compatible with SMF 1.1.4.

I see the files and can view their code via the "view files" link. and have found them in my
Quotewww/forum/Packages/temp/ad_mod_v2-3-1_SMF_vbeta3Public
folder.

What's next?
I've browsed the SMF-Ads Forum, but can't find a step-by-step installation instructions there either.

Thanks

Title: Re: Forum Link plus Ad Mod issue.
Post by: Zetan on April 12, 2008, 06:16:35 AM
What version of TinyPortal are you using? Are you using TinyPortal?
If you are using v 0.9.8 then you need the TP/SMF version of the theme, I don't think this theme has TP support built in like some of the newer Bloc themes. If you are using v 1.0.5 beta, then you will have to add the button code manually. Theres a guide in our Docs section.

As for the Add Management, you do need to seek help at their site. They know what needs to be included in themes.
Title: Re: Forum Link plus Ad Mod issue.
Post by: bas123 on April 12, 2008, 07:26:37 AM
Thanks for the quick reply,

I am using the beta version... v1.05... I've been thru the Docs and couldn't find anything. Can you give me a search term that might get me there easier?

I'll post in the Ads Forum for help with that... However, as far as you know, are there any issues regarding any TP, Themes, or for that matter, SMF and integration or compatibility with the Ad Mod(s)?

In reading about the many add-ons for both SMF and TP, I see many that offer features that I believe would be helpful on this new site I'm developing for someone, but in as much as I'm using such new versions of these programs, I fear that the mods authors haven't been able to catch up.... So I've avoided them.

I'd love to see SMF do a bit of restructuring to allow for the forum hierarchy to separate the specific Mods/Ad-ons. (I know this could be overwhelming).

I'd also like to see a dictate that anyone submitting these mods include a step by step installation guide.
Title: Re: Forum Link plus Ad Mod issue.
Post by: Jpg on April 12, 2008, 07:33:27 AM
It's on the "How To?" Section.

edit-
http://www.tinyportal.net/index.php?topic=9919.0
Title: Re: Forum Link plus Ad Mod issue.
Post by: Zetan on April 12, 2008, 07:33:38 AM
I've not used every theme, mod and I've never used the Ad Management package. I personally couldn't answer whats compatible and what isn't. As for TP 1.0.5, I'm in the middle of trying to upgrade my site as we speak, having a few issues myself  ::)

As for the Adding an Extra Button guide:

http://www.tinyportal.net/index.php?topic=9919.0

Hope this in some part helps..


now, back to pulling hair  :P
Title: Re: Forum Link plus Ad Mod issue.
Post by: bas123 on April 12, 2008, 08:24:30 AM
Thanks for the link, however That post seems to be specific to the default template's menu button strip and placed within a table.

Bloc has used text links in the Tolkien Theme ordered as list items.

Please feel free to review the code I provided above and I'd appreciate it if you (or another knowledgable in these issues) could cut and paste back a revised version of that section.

Note that there IS a reference to  forum just below my comment (in CAPS) :
Quote"I MOVED THIS LINE TO COMMENT SO FORUM LINK WOULD SHOW"...

Thanks!
Title: Re: Forum Link plus Ad Mod issue.
Post by: Jpg on April 12, 2008, 03:14:31 PM
Look for-
if ((isset($_GET['board']) || isset($_GET['topic'])) && empty($settings['use_tp']))
$current_action = 'home';
elseif ((isset($_GET['board']) || isset($_GET['topic'])) && !empty($settings['use_tp']))
$current_action = 'forum';


Change it to-

   if (isset($_GET['board']) || isset($_GET['topic']))
      $current_action = 'forum';
Title: Re: Forum Link plus Ad Mod issue.
Post by: bas123 on April 12, 2008, 07:23:50 PM
Thanks JpgTM, That seems to have worked...

And for others encountering this issue, at first it didn't work, because I reverted the later line // TP "I MOVED THIS LINE TO COMMENT SO FORUM LINK WOULD SHOW" if (!empty($settings['use_tp']))

but the forum link disappeared, so I put it back on the comment line, and all is well.

JpgTM, enjoy your cats cordon bleu!!!

BTW....... Awesome graphics dude!

Title: Re: Forum Link plus Ad Mod issue.
Post by: Jpg on April 12, 2008, 07:47:10 PM
Your welcome, I'm more than glad to help.

And thank you for your comment. I appreciate your kind words. =)
Title: Re: Forum Link plus Ad Mod issue.
Post by: bas123 on April 13, 2008, 02:42:03 AM
A couple more thoughts...

Is there a way to redirect RSS feeds from an RSS block to a " _new" or "_blank browser"  ?

Also, I see references to RSS references in the codes, but no text or link image.
I'd love to activate this feature.
Title: Re: Forum Link plus Ad Mod issue.
Post by: IchBin on April 13, 2008, 02:44:06 AM
What is in the RSS feed, is totally dependant upon the RSS feed. TP does nothing but output what is in the feed.

For future reference, you should start another topic for additional questions that are not related.
Title: Re: Forum Link plus Ad Mod issue.
Post by: bas123 on April 13, 2008, 03:25:34 AM
I will start a new thread - Thanks.