Customizing SMF > Modifications and Packages
SMF Articles (2.5.1 Released with SMF 2.0 support!)
ApplianceJunk:
--- Quote from: saw on September 15, 2011, 04:03:10 AM ---Great mod - thank you!
I'd like to remove the date and views from the actual article header (but keep the 'Submitted By'). Is that possible? Which code should I remove or alter?
--- End quote ---
--- Quote from: vbgamer45 on September 15, 2011, 09:07:26 AM ---It would be in themes/default/Articles.template.php
--- End quote ---
--- Quote from: saw on September 15, 2011, 09:57:50 AM ---Thanks, I found that, but unfortunately I'm not a coder; I need to be pointed to the actual code to remove.
--- End quote ---
I wanted to do the same thing.
I found and removed this code in themes/default/Articles.template.php
--- Code: ---echo '<tr class="windowbg">
<td><span class="smalltext"><b>',$txt['smfarticles_submittedby2'],'</b>', '
<a href="',$scripturl, '?action=profile;u=',$context['article']['ID_MEMBER'],'">', $context['article']['real_name'], '</a>
<b>',$txt['smfarticles_date2'],'</b> ',
timeformat($context['article']['date']), '
<b>',$txt['smfarticles_views2'],'</b> ',
$context['article']['views'], '
</span>
</td>
</tr>';
--- End code ---
ApplianceJunk:
I'm trying to learn how to remove the link tree and search button shown on the article page in the attachment.
I'm looking in themes/default/Articles2.template.php but can't seem to find the right code.
Any help would be greatly appreciated.
Thanks,
vbgamer45:
In the sources folder in articles.php
This code controls the linktree
--- Code: --- // Setup the Link Tree
$context['linktree'][] = array(
'url' => $scripturl . '?action=articles',
'name' => $txt['smfarticles_title']
);
GetParentLink($cat);
--- End code ---
For the top bar with search controlled by this call
ShowArticlesBar();
In the articles2.template.php in themes/default folder
ApplianceJunk:
To remove the link tree I found this code instead in Sources/articles.php
--- Code: ---// Link Tree
$context['linktree'][] = array(
'url' => $scripturl . '?action=articles',
'name' => $txt['smfarticles_title']
);
GetParentLink($context['article']['ID_CAT']);
$dbresult = $smcFunc['db_query']('', "
SELECT
pagetext
FROM {db_prefix}articles_page
WHERE ID_ARTICLE = $article LIMIT 1");
$row2 = $smcFunc['db_fetch_assoc']($dbresult);
$context['article_page'] = $row2;
$smcFunc['db_free_result']($dbresult);
--- End code ---
and commented out this part.
--- Code: ---/*
$context['linktree'][] = array(
'url' => $scripturl . '?action=articles',
'name' => $txt['smfarticles_title']
);
GetParentLink($context['article']['ID_CAT']);
*/
--- End code ---
I tried first playing around with the code you posted, but I could not seem to get the link tree removed by removing any of that code.
Should what I did above effect anything other then removing the article link tree?
Thanks for the help,
Edited to add:
--- Quote ---For the top bar with search controlled by this call
ShowArticlesBar();
In the articles2.template.php in themes/default folder
--- End quote ---
That worked perfect for me.
Thanks again.
SMFHacks.com Team:
Update
2.0.1
!Fixed possible undefined error on the search page
+Added future integration support for Badge Awards
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version