3.1 & 3.2 Extensions Database 3.1 / 3.2Topic Author

<span class="qte-attr qte_31_32-qte">3.1.x &amp; 3.2.x</span>
User avatar

LEOPARD
Users
Users
Posts: 14
Joined: 08 Sep 2016, 21:55
    Windows 7 Chrome

Re: Topic Author

Post by LEOPARD »

Friends, I don't think my question is very complicated. Maybe someone will still answer it?

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Topic Author

Post by Sniper_E »

LEOPARD wrote: 23 Sep 2016, 20:39 How to make "Topic author" was displayed above the avatar and in the center?
You rename the event/viewtopic_body_avatar_after.html to event/viewtopic_body_avatar_before.html

That will place it above the avatar. If it's not center, edit the theme/topicauthor.css and add

Code: Select all

.avatar-container {
	text-align: center;
}
Note: That will center the avatar also.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

LEOPARD
Users
Users
Posts: 14
Joined: 08 Sep 2016, 21:55
    Windows 7 Chrome

Re: Topic Author

Post by LEOPARD »

Sniper_E wrote: 24 Sep 2016, 03:12
LEOPARD wrote: 23 Sep 2016, 20:39 How to make "Topic author" was displayed above the avatar and in the center?
You rename the event/viewtopic_body_avatar_after.html to event/viewtopic_body_avatar_before.html

That will place it above the avatar. If it's not center, edit the theme/topicauthor.css and add

Code: Select all

.avatar-container {
	text-align: center;
}
Note: That will center the avatar also.
No, just the "Topic author" to move. Avatar do not need to do at the center. How to do so?

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Topic Author

Post by Sniper_E »

You rename the event/viewtopic_body_avatar_after.html to event/viewtopic_body_avatar_before.html

That will place it above the avatar. Then edit the theme/topicauthor.css

Code: Select all

.topic-author {
    display: inline-block;
    margin: 10px 4px 10px 0;
Replace margin: 10px 4px 10px 0; with margin: 10px auto;
OR
Replace margin: 10px 4px 10px 0; with margin: 10px 4px 10px 15px;

Play with the margins to get exactly what you want.

User avatar

Mickroz
Users
Users
Posts: 30
Joined: 08 Feb 2015, 22:47
    Windows 10 Chrome

Re: Topic Author

Post by Mickroz »

Add config text color please :D now i have a yellow button with white text on it :wall:
Q: Whats a hash and a root password?
A: hash gets you high, root password gives you god powers, combine the 2 and you are invincible.

User avatar

Musiker15
Users
Users
Posts: 29
Joined: 07 Oct 2016, 16:10
    Windows 10 Chrome

Re: Topic Author

Post by Musiker15 »

German Translation
de.zip
de.zip
Also go in Directory /ext/dmzx/topicauthor/adm/style and open acp_topicauthor_config.html and go to line 24.
There is this

Code: Select all

<dd><input name="topicauthor_text_field" type="text" id="topicauthor_text_field" class="inputbox autowidth" value="{TOPICAUTHOR_TEXT_FIELD}" maxlength="10" /></dd>
Change there the maxlenght to 15.
Then go to general and delete cache. Now you can write in ACP on your Board Themen Autor.
Default is maxlenght 10.
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
Last edited by Musiker15 on 19 Nov 2016, 21:39, edited 3 times in total.
I'm from Germany so my English is not the best...
________________________________________________________________
Image

User avatar

remoss
Users
Users
Posts: 4
Joined: 20 Jan 2016, 10:40
    Android Chrome

Re: Topic Author

Post by remoss »

@Musiker15:
remoss wrote: 17 Aug 2016, 09:40 In ACP the max length of Authors text is limited to 10 characters, so "Topic Starter" didn't fit. I changed it in acp_topicauthor_config.html to max 20 characters, so solved :D
[ Post made via Android ] Image

User avatar

Topic Author
dmzx Online
Founder
Founder
Posts: 6464
Joined: 13 Jan 2014, 21:45
    Windows 10 Chrome

Re: Topic Author

Post by dmzx »

First post updated

User avatar

mjezek
Users
Users
Posts: 5
Joined: 17 Nov 2016, 13:10
    Windows 8 Chrome

Re: Topic Author

Post by mjezek »

Great extension!!! :thumbup:

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Android Chrome

Re: Topic Author

Post by Sniper_E »

Quote: Great extension!!! :thumbup:

Indeed :tumbsyes:

User avatar

Topic Author
dmzx Online
Founder
Founder
Posts: 6464
Joined: 13 Jan 2014, 21:45
    Windows 10 Chrome

Re: Topic Author

Post by dmzx »

First post updated.

User avatar

Puchahawa
Users
Users
Posts: 193
Joined: 20 Jun 2015, 17:58
    Windows 7 Chrome

Re: Topic Author

Post by Puchahawa »

Hey DM, is there a way to make it so the "topic author" does NOT show up in the first post? Kind of a duplicate expression. :lol:

User avatar

Topic Author
dmzx Online
Founder
Founder
Posts: 6464
Joined: 13 Jan 2014, 21:45
    Windows 10 Chrome

Re: Topic Author

Post by dmzx »

Puchahawa wrote: 10 Mar 2017, 23:29 Hey DM, is there a way to make it so the "topic author" does NOT show up in the first post? Kind of a duplicate expression. :lol:
yes you can try this


Open ext\dmzx\topicauthor\event\listener.php
Find This may be a partial find and not the whole line

Code: Select all

public function viewtopic_modify_post_row($event)
	{
		$post_row = $event['post_row'];

		$post_row = array_merge($post_row, array(
			'TOPICAUTHOR_COLOUR'		=> $this->config['topicauthor_colour_field'],
			'TOPICAUTHOR_TEXT'			=> $this->config['topicauthor_text_field'],
			'TOPICAUTHOR_TEXT_COLOUR'	=> $this->config['topicauthor_text_colour_field'],
			'TOPICAUTHOR_ENABLED'		=> $this->config['topicauthor_enable'] ? true : false,
		));
		$event['post_row'] = $post_row;
	}
Replace with Replace the preceding lines with the following

Code: Select all

public function viewtopic_modify_post_row($event)
	{
		$post_row = $event['post_row'];
		$topic_data = $event['topic_data'];
		$row = $event['row'];
		
		$post_row = array_merge($post_row, array(
			'TOPICAUTHOR_COLOUR'		=> $this->config['topicauthor_colour_field'],
			'TOPICAUTHOR_TEXT'			=> $this->config['topicauthor_text_field'],
			'TOPICAUTHOR_TEXT_COLOUR'	=> $this->config['topicauthor_text_colour_field'],
			'TOPICAUTHOR_ENABLED'		=> !$post_row['S_FIRST_POST'] = $topic_data['topic_first_post_id'] == $row['post_id'] ? true : false,
		));
		$event['post_row'] = $post_row;
	}

User avatar

Puchahawa
Users
Users
Posts: 193
Joined: 20 Jun 2015, 17:58
    Windows 7 Chrome

Re: Topic Author

Post by Puchahawa »

That works great. TY :D

User avatar

kaspir
Users
Users
Posts: 112
Joined: 25 Aug 2016, 12:50
    Windows 7 Firefox

Re: Topic Author

Post by kaspir »

Love this ext, however still using these edits in new 1.0.4, when inspected on mobile I would much rather have it aligned left. Also, when not the topic author, inject a simple <br> to keep more vertically aligned on mobile, within the html. I suppose the <br> could be done also with a class="responsive-show" if needed on other themes.

topicauthor.css

Code: Select all

.topic-author {
    display: inline-block;
    margin: 5px 4px 5px 0;
    padding: 2px 5px;
	background-image: url("./images/highlight.png")!important;
    border: 1px solid rgba(0, 0, 0, 0.27)!important;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
	-webkit-box-shadow: 0px 1px 4px rgba(0,0,0,0.3), inset 0px 1px 0px rgba(255,255,255,0.13);
	-moz-box-shadow: 0px 1px 4px rgba(0,0,0,0.3), inset 0px 1px 0px rgba(255,255,255,0.13);
	box-shadow: 0px 1px 4px rgba(0,0,0,0.3), inset 0px 1px 0px rgba(255,255,255,0.13);
	-moz-background-clip: padding;
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2)!important;
    font-size: 9px;
    font-weight: bold;
    background-repeat: repeat-x;
	text-transform: capitalize;
}

view_body_avatar_after.html

Code: Select all

<!-- IF postrow.TOPICAUTHOR_ENABLED -->
	</div><div>
	<!-- IF postrow.S_TOPIC_POSTER -->
		<div class="topic-author" style="background: #{postrow.TOPICAUTHOR_COLOUR}; color: #{postrow.TOPICAUTHOR_TEXT_COLOUR};">{postrow.TOPICAUTHOR_TEXT}</div>
	<!-- ELSE -->
		<br />
	<!-- ENDIF -->
<!-- ENDIF -->
If anyone prefers the same thing.
Image
World of Phaos RPG online is making it's come back! Play free now!
Check out phpBB contributions & extension downloads. :P

Post Reply Previous topicNext topic