MyBB Community Forums

Full Version: Custom Username/title/post formatting - MyPlaza Module
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Okay, here's a module which allows users to change the formatting used in their username, usertitle, and the default formatting used in their posts.

By default, users can only change font and colour, but you can add more customizable CSS styles through the AdminCP.


Note that I recommend having Advanced Modules enabled (please read the readme before doing this) and configured correctly before activating/deactivating this module, unless you're keen on manually doing the ~34 required code edits (if you're really determined, I've supplied a file detailing the code edits required).
Advanced Modules will allow this module to automatically perform these code edits for you. Note that if you consider this a security risk, you should disable Advanced Modules after activating/deactivating this module by deleting the file /inc/myplaza/config_am.php

Please note, I found a bug in the Advanced Modules automatic backup system in v0.2. Basically, the module will fail to backup the files /inc/functions.php and /inc/functions_post.php before performing code edits - I recommend you keep backups of these yourself (although the module will revert code edits when deactivating).
This bug should be fixed in the next release of MyPlaza.
Anyway, this shouldn't be much of an issue unless something horribly wrong happens...


Now, installation instructions:
- Just upload userformat.php to the /inc/plugins/myplaza/ folder, then activate the module through your AdminCP - again, please consider enabling Advanced Modules before you do this Smile

After activating the module, 6 items will be added (change name colour, change name font, change title colour etc) - just assign these to a visible category to make it visible in the plaza.
When you add more CSS formats through the AdminCP, items will automatically be added for you.

And the downloads:
as usaual more great stuff made by you.
thanks man Smile
Thanks pepotiger.

I thought quite a few people wanted this - ability to allow users to change their own username font/colour, but I guess I was mistaken Sad
...
I couldn't activate this module
Quote:MySQL error: 1146
Table 'evgeniy_leealex.myplaza_plaza_items' doesn't exist
Query: ALTER TABLE myplaza_plaza_items CHANGE idname idname VARCHAR(60) NOT NULL

Quote:MySQL error: 1060
Duplicate column name 'nameformat'
Query: ALTER TABLE mybb_users ADD (nameformat VARCHAR(200) DEFAULT '{variable}',titleformat VARCHAR(200) DEFAULT '{variable}',postformat VARCHAR(200) DEFAULT '
{variable}
')
leealex Wrote:I couldn't activate this module
Quote:MySQL error: 1146
Table 'evgeniy_leealex.myplaza_plaza_items' doesn't exist
Query: ALTER TABLE myplaza_plaza_items CHANGE idname idname VARCHAR(60) NOT NULL

Quote:MySQL error: 1060
Duplicate column name 'nameformat'
Query: ALTER TABLE mybb_users ADD (nameformat VARCHAR(200) DEFAULT '{variable}',titleformat VARCHAR(200) DEFAULT '{variable}',postformat VARCHAR(200) DEFAULT '
{variable}
')

I'm getting the same errors.
thanks,
This is great to have more options than usuall.
It make the forum more dynamic.
Sounds really cool. Smile I'll enable that Advanced thingy and check it out.

Thanks!

Edit.....

How do you configure that Advanced Module thing, exactly?
i messed up titles Sad HELP!
i tryed to activate this module but i get an error, then i edited userformat.php i found
	// *urgh* I made idname field too short :(
	if(MYPLAZA_VERSION <= 0.2)
		$db->query('ALTER TABLE `myplaza_plaza_items` CHANGE `idname` `idname` VARCHAR(60) NOT NULL');
	
and changed myplaza to mybb
after that module was activated but all titles disapeared *cry*

EDITED: ok i got it Smile {$post['usertitle']} was missed in postbit - author_user template Smile module replaced {$post['usertitle']} with smth else.
FirefoxWiz Wrote:Sounds really cool. Smile I'll enable that Advanced thingy and check it out.

Thanks!

Edit.....

How do you configure that Advanced Module thing, exactly?
Hmm Have you done the code edits?
Umm, what code edits?
Pages: 1 2 3