Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3987)
Original Poster in Topic View
If you need to report a bug, please do so on GitHub! (https://github.com/Yoshi2889/OPInTopicView)
Ever got lost reading a topic, wondering who is the author again? This mod will help you. It shows (OP) next to the original author, on replies made by him/her in the topic.
Features- Shows (OP) next to the topic starter.
- Integration with the Additional Authors (http://custom.simplemachines.org/mods/index.php?mod=3903) mod; will show (OP) on any additional authors as well.
* (if this feature is not available, the mod will still work correctly)
Changelogv0.1.1! Move the (OP) text string to the Modifications language file.
v0.1- Initial release
Planned features- Show username in linktree(?).
License:This mod is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported license. (http://creativecommons.org/licenses/by-sa/3.0/)
Permissions addedNone.
Files modified- Themes/default/Display.template.php
- Themes/default/languages/Modifications.english.php
Tables added/modifiedYour database will not be modified by this mod.
Languages available- English
Translations are welcome!
Hi,
Looks like a cool mod! 8)
I am using SMF ver 2.0.11, have a semi-custom theme, and have 15 mods.
Is it possible to change the "display" from (OP) to
(OP) {black} or
(OP) {maroon} or
(OP) {blue} ?
The idea is to "soften" the effect.
Thanks in advance,
Siirist
Quote from: Siirist on July 18, 2016, 01:00:00 PM
Hi,
Looks like a cool mod! 8)
I am using SMF ver 2.0.11, have a semi-custom theme, and have 15 mods.
Is it possible to change the "display" from (OP) to
(OP) {black} or
(OP) {maroon} or
(OP) {blue} ?
The idea is to "soften" the effect.
Thanks in advance,
Siirist
It looks like you could change it in this block?
// Show a link to the member's profile.
echo '
', $message['member']['link'];
// Is this poster the first poster? Also take in account any optional additional authors.
if (!empty($message['member']['is_topic_starter']) || !empty($context['add_authors'][$message['member']['id']]))
echo ' <span style="color:red">(', $txt['optv_original_poster'], ')</span>';
echo '
I think the span tag would also accommodate Hex values. *heading off to my test site*
:)
*EDIT* It does; works just fine. Example:
<span style="color:#5599b6;">
Do not existed such change already? ... Possibly I mistook a modification I read somewhere already probare :)... In addition I leave the translation to the Latin Spanish :D
Modifications.spanish_latin.php and Modifications.spanish_latin-utf8.php
$txt['optv_original_poster'] = 'Autor del tema';
As you can see the other complementary changes to make translations in their respective topics;) or else tell me to send them to you!
Regards!
Quote from: Grammy on July 18, 2016, 01:47:05 PM
It looks like you could change it in this block?
// Show a link to the member's profile.
echo '
', $message['member']['link'];
// Is this poster the first poster? Also take in account any optional additional authors.
if (!empty($message['member']['is_topic_starter']) || !empty($context['add_authors'][$message['member']['id']]))
echo ' <span style="color:red">(', $txt['optv_original_poster'], ')</span>';
echo '
I think the span tag would also accommodate Hex values. *heading off to my test site*
:)
*EDIT* It does; works just fine. Example:
<span style="color:#5599b6;">
Purfect!!
However, I modified both the Display.template.php AND Modifications.english.php.
I ended up with just what I wanted ->
(Original Poster)
Quote from: Siirist on July 19, 2016, 09:34:02 AM
Purfect!!
However, I modified both the Display.template.php AND Modifications.english.php.
I ended up with just what I wanted -> (Original Poster)
I'd made mine "Author" but I like your choice much better! ;)
Changing the color works great! Now, how do I change the size? The text is a bit 'in your face' so I'd like to make it smaller if possible.
modify the span tag style to include something like font-size:0.5em;
Quote from: Kindred on July 26, 2016, 10:12:51 AM
modify the span tag style to include something like font-size:0.5em;
Kindred! :D
Changed Display.template.php to this,
echo ' <span style="color:maroon" "font-size:0.25em">(', $txt['optv_original_poster'], ')</span>';
but size did NOT change
Changed Modifications.english.php to this,
$txt['optv_original_poster'] = '<font size="1">Original Poster</font>';
and it looks like this - the parenthesis are still "big"
See attached screenshot
Hoping to learn here, and don't think it merits starting a new topic as size it related.
Had you not posted, I was going to post "Just as I changed the color in the span tag style, change the font size by adding the font size, like this:
<span style="color:#5599b6" "size:8pt;">
Probably only one set of quotes ("blah blah blah")
Anyway, want to learn about font size.
Sometimes it is like this > <font size="4"> (html only?),
sometimes it is like this > Font Size=12pt, (using brackets [ ] only?)
and
sometimes it is like this > font-size:0.5em OR this > font-size:1em (php only?)
Thoughts?
Be Well,
Siirist
no no no...
<span style="color:maroon; font-size:0.25em">
Quote from: Kindred on July 26, 2016, 11:27:41 AM
no no no...
<span style="color:maroon; font-size:0.25em">
Removed my edits from the Display.template.php and Modifications.english.php and applied the code above to the Display.template.php.
:laugh: .25em is tiny
testwill raise to 0.5em or 0.75em ;)
EDIT: Steve, I ended up using 0.65em
Thank you!!!
Thoughts on the size thing I asked about?
Be Well,
Siirist
http://www.w3schools.com/cssref/css_units.asp
in other words, em is the way to go to keep everything relative to the things around it.
px, pt m etc are all absolute... and stay the same regardless of the surrounding responsiveness
% is just weird to use for a font...
Thank you Kindred.
Be Well,
Siirist
Quote from: Siirist on July 26, 2016, 11:43:29 AMEDIT: Steve, I ended up using 0.65em
I went with .70em.
Thanks Siirist and Kindred! ;D
What is the code to change it from text to a image and can it be moved below the topic starter's name?
EDIT: How would you edit it so that the OP indicator isn't in the first post?
Damn, I wish I knew PHP right now.
Quote from: confuseamuse on July 05, 2017, 07:01:20 AM
What is the code to change it from text to a image and can it be moved below the topic starter's name?
EDIT: How would you edit it so that the OP indicator isn't in the first post?
Damn, I wish I knew PHP right now.
Finally worked out how to do it :)