MyBB Community Forums

Full Version: Website Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
INTRODUCTION
The Website Plugin is and will be an easy way for a user (who lacks web design knowledge or is lazy ^^) to create a small, seperated, and integrated website for different kinds of information that they choose to add. It's like a free host but not..

VERSIONS
This is specifically made for MyBB 1.4.x! However, if enough people ask, I will convert the plugin to 1.2.x.

Once the Website plugin is finished, a Beta version will come out. Once it does, I ask that anybody experiencing problems to PM me or post here! Once all the problems are fixed up, the updated version will be released.

Lastly, there may be updates overall to the plugin (not just the Templates). But this isn't expected to come too soon.

FEATURES

Here are the currently finished features:

1. Quick Login on site page. If logged in, quick links to their Profile, PMs, and CP are provided. Users can also Logout as well.
2. Ability to turn the site on/off without losing information.
3. Change the error message that users receive if the site is off. Leaving it blank will enter in a default message.
4. Change the Title of the site: <title></title>.
5. Select a template from a small list.
6. Change the Site's Logo.
7. The specified user can ADD, EDIT, or DELETE pages.
8. Settings in the ACP can be changed to hide the options to add, edit, or delete.
9. Links can be "hidden" from the Menu when editing or adding a page. The page itself exists but users can't see the link to it (they can still view the page itself though).
10. Disable specific pages from being viewed by anybody except for the users that can edit the Site.
11. Colors are based on the Forum's skin.
12. Ability to change the WebSite Plugin folder name without causing harm.
13. Change the orders of pages.
14. Change the default (index) page title and content.
15. When viewing a page, users that can edit the site can click on a link under the page to edit it.
16. When adding or editing a page, you will not be allowed to leave the name, url, title, or content blank and will be able to change what you've already added so far.
17. Change the link name that's shown in the Forums Header.
18. Change Logo width and height.
19. If the Logo is positioned to the top, admins can change the alignment of it (left; right; center).
20. Add or remove a border around the Logo with a specified size.
21. Ability to change the welcomeblock alignment (left; right; center).
22. Add links that lead directly to another website. Choices are given to have them open in a new window.
23. Specified users can edit the website.
24. Specified usergroups can edit the website.
25. Deny specified users from viewing the website.
26. Deny specified usergroups from viewing the website.
27. Ban IPs from viewing the website (can still view the forums).
28. Clean and simple template for Administrative editing within the WebSite Integration plugin.
29. Denies every user entry into the WebSite if the files were added but the plugin was not activated.
30. HTML is allowed when adding a new page into the site giving many more options to an admin.


Here are the unfinished features:

None. All done ^^.

Here are the features that were planned but have been scrapped:

1. Site skins can be selected from already existing forum skins.


OTHER
In the future, I will be planning on creating extra site templates that can be easily uploaded and used. All the templates will be simple and basic.

NOTE:
As this is the first plugin that I'm making, I may need help or suggestions from people.. so.. help pleash Sad
Sounds brilliant:

Quote:9. Only specified users (by UID) can EDIT the Sites content. **

Perhaps doing it by groups would be so much easier.

Look forward to it.
Sounds like a great plugin.

How will the site structure look like though?

site.com/userwebsite/

or site.com/userwebsite.php?
blueparukia Wrote:Perhaps doing it by groups would be so much easier.
Well it can be safer to have specific and trusted users managing the site, but I'll add that in as well. Besides, the group that you're allowing to edit the site should only include trusted users ^^

PwnEm Wrote:How will the site structure look like though?

site.com/userwebsite/

or site.com/userwebsite.php?
The default shall be: www.name.com/website/index.php

It's got several files but I'm planning on combining 2 into 1 for easier use. You can also change the folder name in your File Manager and change settings in the ACP so it matches the name and allowing you to use whatever name you want for your website folder. Basically the same as Mybb's {$mybb->settings['bburl']} except a different name.

And the first post in this thread has been updated. More features have been added ^^.

The default templates are done, tested, and successful. I'll give a list of them tomorow but I have to go >.<



Edit:

And here's the list of templates. There's not much to it but it's meant to be basic. And, as stated in the features in the first post, it is easily edited to your likings.

1. Left Menu (body is to the right)
2. Left Menu; Left Logo (body is to the right)
3. Left Menu; Top Logo (body is to the right)
4. Right Menu (body is to the left)
5. Right Menu; Right Logo (body is to the left)
6. Right Menu; Top Logo (body is to the left)
7. Top Menu (body is centered)
8. Top Menu; Top Logo (body is centered)

As stated earlier, I shall be making more templates. The plugin is nearly done.. I just need to have selectable permissions that can be set in the ACP. I'm also thinking of some more things to add as well..



Edit2:

And the Features has been updated a second time.



Edit3:

And now a third time. Trying to finish this as soon as possible..
I searched Google and found out that arrays (something I don't exactly use) can be used for using multiple entries..:

if (((in_array($mybb->user['uid'], array($mybb->settings['site_admin_uids'])))))

And this means, after editing some things, I am done with this plugin and I just have to create the plugin file. I will release the beta soon today. If not, it WILL be released tomorow.

To blueparukia:

You can define both the users and usergroups. If you define a user that does not belong to a specified usergroup, they can still edit the site. Same with not being able to view the site.

And just another thing.. I will be giving an option to ban IPs from the website. I have not yet tested this (because I don't want to try banning my own IP) but I believe that if your IP is banned for the Forums, it'll be banned for the site as well. The same thing occurs if you turn the board off. And it's much easier to ban IPs then I first thought ^^. I will still take any suggestions though!

Edit:

Sorry for double posting >.< Gotsa finish this up 8(

Edit2:

Ok, for some reason when I started testing for a final time (after adding the new stuff to every file), the:

if (((in_array($mybb->user['uid'], array($mybb->settings['site_admin_uids'])))))

Stopped working and I can't seem to get it to work again.

Does anybody, at all, know how to do this correctly? Without any possible way of it suddenly failing?
Well, for one thing it looks from that snippet like you could remove a couple of the outside parentheses to increase readability and reduce likeliness of a parentheses mismatch. However, without seeing more code we're unlikely to see what the problem is. Have you checked to make sure all of the semicolons are where they should be? I'd especially check the line or two before the if statement...
try this

$uids = explode(",",$mybb->settings['site_admin_uids']);

if (in_array($mybb->user['uid'], $uids))
Oops.. I did almost the exact same thing before this, Labrocca.. but instead I reversed the array xD.

Well thank you VERY much for helping me with this, as it did work! Now admins can allow specific users and groups to edit the site, deny specific users or groups, and ban IPs.

Firestryke31 Wrote:you could remove a couple of the outside parentheses
Yea, those tons of parenthesis killed my eyes xD. Luckily, combining the exlode() and in_array() made it easier.

Thanks again, Lab!

Turning this into a plugin file right now.
Thanks!
Really awaiting it!
I know I'm over a day late on what I promised, but I have finished the plugin and submitted it to the Mods section on the site. So now we just wait for an admin to approve it ^^. I have added several more features making it exactly 30. But, of course, there are a few features that I probably couldn't remember to add, but 30 is a good number ^^. There are also 22 settings that provide lots of different results, so.. yea.. >8P

Please take note that the templates are nothing more then basic templates. But the future will hold more advanced templates..

And just to clarify: Are there any other steps involved after submitting the plugin, besides waiting?
Pages: 1 2