SMF Support > SMF 1.1.x Support
How to Choose Topics for Hot Forum Links
cliFinc:
--- Quote from: mashby on July 15, 2012, 05:33:35 PM ---Are you the admin on the forum? Are you using the default theme? If not, does the theme you are using have its own Display.template.php or MessageIndex.template.php?
Sorry I missed seeing it on the last image there. :)
--- End quote ---
That was pretty fast :) Yes I'm the admin and I have both files on the theme I'm using - Babylon. I even tried uninstalling and reinstalling but it won't change anything. The install was reported successful
mashby:
I bet it's working as expected on the default theme. :)
You'll have to manually edit both of those files for the Babylon theme to work on that theme as most themes only install on the default Core theme. You can find the parsing directions on the mod's download page.
cliFinc:
Thanks. but ohhh! The edits are pretty much. How can I find the ones that were not done automatically so I can edit them manually? Is there a way I can do this?
mashby:
Based on the parsing edits, no changes were made to anything in the Babylon theme.
Themes/default/Display.template.php
Find:
--- Code: --- 'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
);
--- End code ---
Replace with:
--- Code: --- 'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'add_hot_link' => empty($modSettings['enable_hot_forum_links']) ? array('test' => 'modify_hfl_link') : (array('test' => 'can_add_hot_forum_link', 'text' => ($context['hot_forum_links']['is_add'] ? 'hfl_add_hot_link' : 'hfl_remove_hot_link'), 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=hotforumlinks;sa=' . ($context['hot_forum_links']['is_add'] ? 'addlink' : 'removelink') . ';topic=' . $context['current_topic'] . '.0')),
'modify_hot_link' => empty($modSettings['enable_hot_forum_links']) || $context['hot_forum_links']['is_add'] ? array('test' => 'modify_hfl_link') : array('test' => 'can_add_hot_forum_link', 'text' => 'hfl_modify_hot_link', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=hotforumlinks;sa=modifylink;topic=' . $context['current_topic'] . '.0;from_topic'),
);
--- End code ---
Themes/default/MessageIndex.template.php:
Find:
--- Code: --- <a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';
--- End code ---
Add after:
--- Code: --- if (!empty($topic['is_hot_link']))
echo '<img src="', $settings['default_images_url'], '/hotlink.png" alt="' . $txt['hfl_messageindex'] . '" />';
--- End code ---
Do similar edits for the babylon theme files. :)
cliFinc:
Instead of meddling with the codes in Babylon theme, I decided to try the mod out on SMF's default theme, but the problem still persisted. The "Add as Hot Link" doesn't show up. What else can I check?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version