Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 12, 2022, 09:04:21 AM

Login with username, password and session length
Members
  • Total Members: 3842
  • Latest: Kokoro
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 50
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 44
Total: 44

Author Topic: Move Submit an Article to User Box block  (Read 2230 times)

0 Members and 1 Guest are viewing this topic.

JPDeni

  • Guest
Move Submit an Article to User Box block
« on: October 18, 2006, 07:31:40 PM »
Piece o' cake! :)

In TPortalBlocks.template.php, look for function TPortal_userbox()

After
Code: [Select]
if(isset($context['TPortal']['userbox']['unread'])){
echo '<br />'.$bullet.'<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
<br />'.$bullet.'<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
<br />'.$bullet.'<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>';
}

add

Code: [Select]
if(!isset($context['TPortal']['can_submit_article']))
  $context['TPortal']['can_submit_article']=0;
if($context['TPortal']['can_submit_article']==1)
  echo '<br />',$bullet.'<a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a><br />';
Edited to fix the inevitable bugs.
« Last Edit: October 18, 2006, 07:45:30 PM by JPDeni »

rbh

  • Guest
Move Submit an Article to User Box block
« Reply #1 on: October 18, 2006, 08:58:04 PM »
you're a peach! :) it worked like a charm of course. thanks