MyBB Support

Inserting text into a template

Submitted by Addicted, , Thread ID: 11839

Thread Closed
Addicted
Freak
Divine
Level:
0
Reputation:
105
Posts:
2.77K
Likes:
130
Credits:
9.94K
25-10-2015, 07:44 PM
This post was last modified: 27-10-2015, 11:39 PM by Addicted
#1
Would there be any I could use a plugin to insert text without using a custom template here:

[Image: VbxuoF2.png]
^^ Around the 1/2 Year Registered Part ^^

I also would rather do this via a plugin because I don't like having to edit the templates directly.

RE: Inserting text into a template

AAA
Offline
Level:
0
Reputation:
73
Posts:
834
Likes:
110
Credits:
582
25-10-2015, 07:48 PM
#2
No! Curently there is no plugin to do something like that picture ;D
[Image: XhhKTdF.png]

RE: Inserting text into a template

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
25-10-2015, 07:52 PM
This post was last modified: 25-10-2015, 07:56 PM by linkzy
#3
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 == 1  ) ? '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
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


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.

RE: Inserting text into a template

Illuminatus
Fulltime Member
Level:
0
Reputation:
62
Posts:
1.57K
Likes:
59
Credits:
95
25-10-2015, 10:01 PM
#5
I think there is no plugin for that.
Do not allow the eye to fool the mind.

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, 10:21 PM
#6
25-10-2015, 10:01 PM
Gnar Wrote:
I think there is no plugin for that.

I am not looking for a plugin. I am trying to make a plugin do it.

RE: Inserting text into a template

Illuminatus
Fulltime Member
Level:
0
Reputation:
62
Posts:
1.57K
Likes:
59
Credits:
95
25-10-2015, 10:25 PM
#7
25-10-2015, 10:21 PM
Addicted Wrote:
25-10-2015, 10:01 PM
Gnar Wrote:
I think there is no plugin for that.

I am not looking for a plugin. I am trying to make a plugin do it.

Sorry I misread that.
Do not allow the eye to fool the mind.

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, 11:23 PM
#8
25-10-2015, 10:25 PM
Gnar Wrote:
25-10-2015, 10:21 PM
Addicted Wrote:
25-10-2015, 10:01 PM
Gnar Wrote:
I think there is no plugin for that.

I am not looking for a plugin. I am trying to make a plugin do it.

Sorry I misread that.

No Problem.


I am still looking for help though.

RE: Inserting text into a template

Addicted
Freak
Divine
Level:
0
Reputation:
105
Posts:
2.77K
Likes:
130
Credits:
9.94K
OP
27-10-2015, 02:36 AM
#9
Still looking for help :D

RE: Inserting text into a template

mesleepy
Closed Account
Level:
0
Reputation:
0
Posts:
20
Likes:
0
Credits:
56
27-10-2015, 11:37 PM
#10
Picture is broken, fix it.

Users browsing this thread: 1 Guest(s)