News:

Wondering if this will always be free?  See why free is better.

Main Menu

Editing the display.template

Started by ~Brenoknot, August 21, 2011, 01:11:45 AM

Previous topic - Next topic

~Brenoknot

Hello, I need help in editing the display.template.php if this is not the right area, sorry...
The first thing I need is to edit it:



I would like to leave "Posts:" in bold like the "Karma:";

The second thing I need is help:


I like to put "+" to the right as it is in the image;

So that's it, I would be grateful if you help me ^ ^





Sir Osis of Liver

This will do the first thing -



// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount"><strong>', $txt['member_postcount'], '</strong>: ', $message['member']['posts'], '</li>';




I'm not seeing what you're seeing for the karma widgets in 2.0 Curve.  Attach your Display.template.php.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

~Brenoknot

Attached, thanks for solve the first question :)

Sir Osis of Liver

Ok, in Display.template.php find this:



<li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<li class="karma_allow">
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
</li>';




Change to this:



<li class="karma">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '<!--/li-->';
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<!--li class="karma_allow"-->
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
</li>';


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

~Brenoknot

#4
Hello, really worked, but im have a problem... I enabled the Karma to completely, leaving only the positive karma, but when you activate this option, the "+" back down as before.

Sir Osis of Liver


Didn't see that - never use karma.  Do this:



// Is karma display enabled?  Total or +/-?

if ($modSettings['karmaMode'] == '1')
echo ' <li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<!--/li-->';


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Matthew K.

@Topic Starter - Is the issue resolved for you now?

~Brenoknot

Sorry for the delay, but unfortunately did not work, I really do not know why, but the "+" is still below as before...
I had tested in the test forum ( localhost ), now goes to a print as is normal in my forum:


Sir Osis of Liver

Looks like you're running some mods or a theme that affects the poster panel.  Your original screenshot is default Curve, and the edit works in Curve, but the ss in your last post is quite different. 

Attach your display.template.php and I'll take another look.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

~Brenoknot

Yeah, I had thought of this hypothesis mods play out, or even the boxes that separate the profile, follow the attached "index.css" to see if you have a problem involving the boxes, and "display.template.php" as you had requested, thanks for help so far!

Sir Osis of Liver

Your current Display.template.php does not have the code edits to move the widget. The karma section is the same as Curve.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

~Brenoknot

So how could I solve this, the boxes are they likely would prevent the "+" stand up?
Yes, I am the same files using the default theme, for my theme today is OverviewLight 2.0 - By DzinerStudio

Sir Osis of Liver


The Display.template.php you attached to your previous post does not include the code edits I posted above to move the widget, so it will be displayed in it's original default position.  If the theme has it's own Display.template.php, you'll have to edit that file.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

~Brenoknot

Hello, actually I removed the changes before sending to you put to me, really sorry about that, I tried again and failed, in case your question, my theme folder does not have the Display.template.php, this theme uses the settings of the Default theme.
Again, thanks for help so far!



Sir Osis of Liver


Most likely a mod is causing the problem.  Your screenshot of the poster panel doesn't look anything like the OverViewLight demo, which is basically the same as this board.  The only difference in index.css is the centering of the elements, which shouldn't affect the layout of the karma widgets.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Dragnovith

Quote from: Krash. on August 24, 2011, 10:36:17 PM

Most likely a mod is causing the problem.  Your screenshot of the poster panel doesn't look anything like the OverViewLight demo, which is basically the same as this board.  The only difference in index.css is the centering of the elements, which shouldn't affect the layout of the karma widgets.

This forum: hxxp:forumaqworldsbrasil.com [nonactive] ,uses the same theme OverView Light! And they have managed to move the button karma!


Sir Osis of Liver

Try the default theme and see if the + is where you want it.  You have a mod installed that has added elements to the poster panel, and may be reformatting it.  If the default theme is correct, and OverView does not have a DisplayTemplate.php, then the mod is causing the problem.

And please to not pm me with support questions.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

~Brenoknot

Okay, I'll take a look, thanks for the help Krash :) Mark Thread as resolved, once again, thank you for your support!

Advertisement: