Not Solved Reply In Portal
#1
Not Solved
(I'm new, first post, I've been using Mybb for about a week as of now.)I am very new at php, but i will be able to follow most directions when i ask this. Can i have "reply" show up as a link in the portal for announcements/news? Not the button, but actual text? I would like it to show up whether your are logged in or not, and if you aren't logged in, it redirects you.(I have the forum permissions set to only users and above can post.) I can customize the text with CSS, HTML, and what not(even though there is a default link style), but I have no experience in php. I know where i want to put it, I just need to know the php code to insert for the static link? Could someone please help me?
Reply
#2
Not Solved
In portal.php
find:
$announcement['message'] = $posts[$announcement['tid']]['message'];
Add above:
if($mybb->user['uid'] != 0)
{
	$reply_link = "<a href=\"{$mybb->settings['bburl']}/newreply.php?tid={$announcement['tid']}\">Reply</a>";
}
else
{
	$reply_link = "";
}

Then go to Admin CP -> Templates -> Modify / delete -> *your template set* -> Portal Templates -> portal_announcement
Add:
{$reply_link}
Where you want it to display.
For example after:
{$numcomments}
like:
{$numcomments} - {$reply_link}

Hope this helps.
Reply
#3
Not Solved
Awesome!!! I changed that code you gave a little so the "reply" link shows up whether you're logged in or not (just simple copy and paste). Thanx!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)