Hey guys, how do I make the link of the plugin "profile comments" the same style as my other links in my topbar?
Here the code of my topbar in header_welcomeblock_member:
<div class="topbar">
<span class="my_welcome">{$lang->welcome_back}<a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}"></a>.</span>
<a href="{$mybb->settings['bburl']}/usercp.php"><span><small>{$lang->welcome_usercp}</small></span></a>
<small>{$modcplink}
<b>{$admincplink}</b></small>
<a href="{$mybb->settings['bburl']}/private.php"><span class="my_welcome"><small>{$lang->welcome_pms} {$lang->welcome_pms_usage}<!-- ProfileComments --> <span class="my_welcome"> <a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}" title="{$lang->profile_comments}">{$lang->profile_comments_new_inmenu}</a> {$lang->profile_comments_new_inmenu_count} </span> <!-- /ProfileComments --></small></b></a></span>
<a href="{$mybb->settings['bburl']}/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}"><span><small>{$lang->welcome_logout}</small></b></span></a>
</div>
Picture topbar: [attachment=31058]
You might need to go into the actual profilecomments.php and edit the template style if you get what I mean. I had to do that for myself too.
I know what u mean, but my coding is so basic I don't know what and where to edit
(2014-02-17, 08:46 PM)MikeInToshx Wrote: [ -> ]I know what u mean, but my coding is so basic I don't know what and where to edit
Go to where every mybb is stored/inc/plugins/profilecomments.php
Then go to: line 1711: That is where it is activitated and that is where the templates will be added, till line: 1850, where I believe it ends. Let me know if you need help!
*Note this is normal code! Not modified!
$new_template['profile_comments'] = '{$comments_form_edit}
<br />
<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
<thead>
<tr>
<td colspan="2" class="thead">
<div>
<strong>{$lang->profile_comments_list}</strong>
</div>
</td>
</tr>
</thead>
<tbody style="{$hidecomments}" id="comments_e">
{$comments_form}
{$comments}
</tbody>
</table>
{$pagination}
<script type="text/javascript" src="{$mybb->settings[\'bburl\']}/jscripts/comments.js"></script>';
// Create new templates
$new_template['profile_comments_alert'] = '<div class="pm_alert" id="new_comment_notice">
<div>
<a href="{$mybb->settings[\'bburl\']}/member.php?action=profile&uid={$mybb->user[\'uid\']}" title="{$lang->profile_comments}">{$comments_alert_text}</a>
</div>
</div>
<br />';
$new_template['profile_comments_delete'] = '- <a href="member.php?action=profile&uid={$target[\'uid\']}&op=delete&mid={$id}" class="delete_link" title="{$lang->profile_comments_delete_comment}">{$lang->profile_comments_delete}</a>';
$new_template['profile_comments_edit'] = '- <a href="member.php?action=profile&uid={$target[\'uid\']}&op=edit&mid={$id}" title="{$lang->profile_comments_edit_comment}">{$lang->profile_comments_edit}</a>';
$new_template['profile_comments_form'] = '<tr id="comment_form">
<td colspan="2" style="text-align: left;" class="trow2">
<form id="newcomment" name="newcomment" action="member.php?action=profile&uid={$this->target[\'uid\']}&op=new" method="post">
<div id="replyingto" class="pm_alert" style="display: none;"></div>
<p>
<textarea name="message" id="message" rows="10" cols="70" tabindex="5"></textarea>
</p>
<p>
<input type="hidden" name="reply_to_profile" id="reply_to_profile" value="default" />
<input type="hidden" name="to_uid" id="to_uid" value="{$this->target[\'uid\']}" />
<input type="submit" id="sendcomment" value="{$lang->profile_comments_add_button}" tabindex="6" />
</p>
{$editor}
<script type="text/javascript">
var editorloaded = {$editor_active};
var comments_ajax = {$ajax};
var current_user = {$mybb->input[\'uid\']};
var replying_message = \'{$lang->profilecomments_replying}\';
var confirm_delete_message = \'{$lang->profilecomments_confirm_delete}\';
</script>
</form>
</td>
</tr>';
$new_template['profile_comments_form_edit'] = '<br />
<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
<thead>
<tr>
<td colspan="2" class="thead">
<div>
<strong>{$edit_form_title}</strong>
</div>
</td>
</tr>
</thead>
<tbody id="comments_e">
<form id="newcomment" name="newcomment" action="member.php?action=profile&uid={$this->target[\'uid\']}&op=do_edit&mid={$comment[\'mid\']}" method="post">
<tr>
<td colspan="2" class="trow2">
<p>
<textarea name="editmessage" id="editmessage" rows="10" cols="70" tabindex="3">{$comment[\'text\']}</textarea>
</p>
<p>
<input type="submit" value="{$lang->profile_comments_edit_button}" tabindex="4" />
</p>
</td>
</tr>
</form>
</tbody>
</table>';
$new_template['profile_comments_form_no_access'] = '<tr>
<td colspan="2" style="text-align: left;" class="trow2">
<p>{$reason}</p>
</td>
</tr>';
$new_template['profile_comments_list'] = '<tr id="comment-{$id}">
<td class="{$style}" rowspan="2" width="100" style="text-align: center; vertical-align: top;">
<img style="width: 90px;" src="{$avatar}" alt="{$username_plain} " />
</td>
<td class="{$style}" >
{$username} <small style="font-size: 10px;">({$date} {$lang->at} {$time})</small><br />
<span style="font-size: 10px;">
{$reply} {$edit} {$delete}
</span>
</td>
</tr>
<tr>
<td class="{$style}" >
{$text}
</td>
</tr>';
$new_template['profile_comments_nocomments'] = '<tr id="no_comments_found" >
<td class="trow1" colspan="2">
{$lang->profile_comments_none_found}
</td>
</tr>';
$new_template['profile_comments_reply'] = '<a href="#" username="{$comment[\'username\']}" userid="{$comment[\'sender\']}" class="reply" title="{$lang->profile_comments_reply}">{$lang->profile_comments_reply}</a>';
$new_template['profile_comments_statistics'] = '<tr>
<td class="trow1"><strong>{$lang->profile_comments_received}</strong></td>
<td class="trow1">{$received}</td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->profile_comments_given}</strong></td>
<td class="trow1">{$given}</td>
</tr>';
$new_template['profile_comments_ucp_notification'] = '<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="commentnotify" id="commentnotify" value="1" {$commentnotifycheck} /></td>
<td><span class="smalltext"><label for="commentnotify">{$lang->comment_notify}</label></span></td>
</tr>
<tr>
<td colspan="2"><span class="smalltext"><label for="commentnotify">{$lang->who_can_leave_comments}</label></span></td>
<tr>
<td colspan="2">
<select name="commentsfilter" id="commentsfilter">
<option value="0" {$anyone_can_leave_comments}>{$lang->anyone_can_leave_comments}</option>
<option value="1" {$only_friends_can_leave_comments}>{$lang->only_friends_can_leave_comments}</option>
<option value="2" {$nobody_can_leave_comments}>{$lang->nobody_can_leave_comments}</option>
</select>
</td>
</tr>';
Yeah I see it, though no idea what to edit <.<
(2014-02-18, 10:52 AM)MikeInToshx Wrote: [ -> ]Yeah I see it, though no idea what to edit <.<
Oh, my bad, try ACP>>Templates & Styles>>Templates>YOUR THEME>>Header Templates>>header_welcomeblock_member
Find:
<!-- ProfileComments --> | <a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}" title="{$lang->profile_comments}">{$lang->profile_comments_new_inmenu}</a> {$lang->profile_comments_new_inmenu_count}<!-- /ProfileComments -->
Replace with:
<!-- ProfileComments --> | <a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}" title="{$lang->profile_comments}">Profile Comments</a> {$lang->profile_comments_new_inmenu_count}<!-- /ProfileComments -->
That didn't work.
Well I'll just remove that link then. Thanks anyways