vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=314198

Creating Addons
by Black Snow
09 Sep 2014 08:15

Hi,

I have a few different themes on my board and when ever I install a new theme, I have to make manual edits to make everything fit the way I want it to.

For example: I have the post thanks mod installed and I have changed the look of the "thanks box". So I uploaded a new theme, and I have to go into it and edit the thanks box to look the same as the other themes.

I'm looking for someone who can help me create (more to the point, learn) an addon so I can make my own in the future for this kind of situation.

Thanks

cellarius 09 Sep 2014 08:39

You want to recreate an existing addon from scratch just because you have to make some style edits? How often do you install new styles :eek:

ozzy47 09 Sep 2014 09:58

Some mods are going to be that way, if they use their own classes, vs using built in classes.

Even if you were to us built in classes, it would be using a stylevar, which you would have to change to suit your needs. Or create your own class, assign it a stylevar, and change it for each style.

For most mods, it is much easier just to edit the template, or the CSS for the mod in that style.

Black Snow 09 Sep 2014 10:35

Quote:

Originally Posted by cellarius (Post 2514327)
You want to recreate an existing addon from scratch just because you have to make some style edits? How often do you install new styles :eek:

I am always changing the layout of the forum, adding new things, removing other things. When I do it to one style, I need to do it to the other styles. I want to make an addon so I can make the edit once, and install it so I don't need to manually edit each style. It will use stylevars eventually to fit with each style but for now I want to make a basic addon to do what I'm asking.

ozzy47 09 Sep 2014 10:38

There is no tutorial, basically you have to know, php, html, css, and have a understanding of how vBulletin works. Then take it and put it all together.

PHP, basic guide: PHP 5 Tutorial

HTML basic guide: HTML Tutorial - (HTML5 Compliant)

CSS basic guide: CSS Tutorial

vBulletin basic mod guide: Creating a Product

Black Snow 09 Sep 2014 10:48

Quote:

Originally Posted by ozzy47 (Post 2514349)
There is no tutorial, basically you have to know, php, html, css, and have a understanding of how vBulletin works. Then take it and put it all together.

PHP, basic guide: PHP 5 Tutorial

HTML basic guide: HTML Tutorial - (HTML5 Compliant)

CSS basic guide: CSS Tutorial

vBulletin basic mod guide: Creating a Product

Hi ozzy47,

I understand PHP, HTML & CSS to a degree. I was looking at your recent mod: http://www.vbulletin.org/forum/showthread.php?t=314177

What I don't understand yet is, if I create an addon (say to replace the post thanks box look) and include my code, will it automatically overwrite the default thanks box code from the post thanks mod? Or do I need to do something to overwrite the default code?/

Scanu 09 Sep 2014 11:24

Well actually if you only need to keep changes in templates of a mod, you need to turn on debug mode and edit the template on the master style. This way when you add a new style you won't need to change templates again. However if you still want to know how to make an addon and you already have php and html knowledge you can look for a tutorial ppsted on vb.com on how to make a vb5 extension, it's almost the same

Black Snow 09 Sep 2014 11:30

Quote:

Originally Posted by Scanu (Post 2514365)
Well actually if you only need to keep changes in templates of a mod, you need to turn on debug mode and edit the template on the master style. This way when you add a new style you won't need to change templates again. However if you still want to know how to make an addon and you already have php and html knowledge you can look for a tutorial ppsted on vb.com on how to make a vb5 extension, it's almost the same

I thought that you could only edit the master theme with child themes if they were the same theme? I have 6 completely different themes. I will have a look for the article you mentioned.

TheLastSuperman 09 Sep 2014 21:49

Quote:

Originally Posted by Black Snow (Post 2514346)
I am always changing the layout of the forum, adding new things, removing other things. When I do it to one style, I need to do it to the other styles. I want to make an addon so I can make the edit once, and install it so I don't need to manually edit each style. It will use stylevars eventually to fit with each style but for now I want to make a basic addon to do what I'm asking.

Try doing it this way then:
http://www.vbulletin.org/forum/showthread.php?t=307739

One plugin could seemingly manipulate all styles to suit, you can define differences there as well.

Edit: Do not turn on debug mode and edit your master style, no!

TheLastSuperman 09 Sep 2014 21:50

Quote:

Originally Posted by Scanu (Post 2514365)
Well actually if you only need to keep changes in templates of a mod, you need to turn on debug mode and edit the template on the master style.

That is not advised.

Scanu 10 Sep 2014 05:32

Quote:

Originally Posted by TheLastSuperman (Post 2514452)
That is not advised.

Why? If that is a public board you mean?

cellarius 10 Sep 2014 06:32

Because the master style will be overwritten when he next upgrades. And I don't imagine he fancies redoing all his styling after every upgrade :)

Black Snow 10 Sep 2014 09:52

Quote:

Originally Posted by TheLastSuperman (Post 2514451)
Try doing it this way then:
http://www.vbulletin.org/forum/showthread.php?t=307739

One plugin could seemingly manipulate all styles to suit, you can define differences there as well.

Edit: Do not turn on debug mode and edit your master style, no!

Thanks for the link and info. It's not simply just the CSS I want to change, it's the template I want to change too. I have edited the Post Thanks box template and renamed certain <DIV> classes and added new div's also. So I want to make a plugin OR addon which will overwrite the default code/template.

ozzy47 10 Sep 2014 10:02

O create a new template, in each style, with the exact contents you want. Then create this plugin using the hook location, template_render_output


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


ozzy47 10 Sep 2014 22:23

Ohhh, I should also add you will need to cache that new template, using the hook location, cache_templates like so.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



All times are GMT. The time now is 23:49.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.