MyBB Support

Inserting text into a template

Submitted by Addicted, , Thread ID: 11839

Thread Closed

RE: Inserting text into a template

Addicted
Freak
Divine
Level:
0
Reputation:
105
Posts:
2.77K
Likes:
130
Credits:
9.94K
OP
25-10-2015, 07:56 PM
This post was last modified: 25-10-2015, 07:57 PM by Addicted
#4
25-10-2015, 07:48 PM
ScarlettJohansson Wrote:
No! Curently there is no plugin to do something like that picture ;D

No, I wasn't refering to actually do the Staff member tag and years of service tag. I made those myself.

I was wondering if I could do that without using a template but instead being able to insert text into a certain part of a template with a plugin.

25-10-2015, 07:52 PM
Believer Wrote:
Not sure what it does but its similar to years of service

PHP Code:
// Add <yrs_lsx> in the postbit to show it up.
$plugins->add_hook'postbit''yrs_lsx' );

function 
yrs_lsx(&$post)
{
    
$yrslsx date'Y'TIME_NOW $post['userregdate'] );
    
$years = ( $yrslsx == ) ? 'Year' 'Years';
     return 
str_replace('<yrs_lsx>'$yrslsx $years' of Service' $post['message']); 


and about that staff tag. it can be doen by checking if user is given gid.. if its == true then
find_replace_templatesets that temp

Yeah like I said to AAA. It wasn't about adding those specific things. I was wondering about the location.

Users browsing this thread: 1 Guest(s)