4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: osuejm on May 23, 2006, 04:41:54 PM

Title: Allow users to add subcategories [MOD]
Post by: osuejm on May 23, 2006, 04:41:54 PM
I have recently just installed 4images on my server and have seen many requests to allow users to add subcategories to the 4images gallery not having to give them admin rights.  I have hacked the admin pgp code to allow for this on my site.  I have attached the 3 files that i use to make this happen.  PLEASE BACKUP ALL YOUR FILES BEFORE ADDING THIS MOD.  I AM NOT AWARE OF ANY SECURITY ISSUES BUT I AM NOT RESPONSIBLE FOR ANY SECURITY ISSUES.  I am not a programmer this is what i did to get it to work on my site. 

This allows a user to add subcategories and then delete or edit those subcategories only, and no access to rename or delete the primary categories.

Add the following files to your 4images root dir.
editcategories.php
user_functions.php
user_global.php

I have left in the information that i commented out as I did not want to corrupt my files in case i needed it later.  All i did then off my home.html template page is added a link off the menu to editcategories.php and it worked.  You can post your questions, but i cannot guarantee an answer as i am not a programmer.  This is my attempt to get something like this to work and if anyone cares to improve on it like making a html template file so it can be integrated into the rest of the website to have a header, side bar, content, and footer, that would be greatly appreciated.  Good luck and remember to back up your files!
Title: Re: Allow users to add subcategories [MOD]
Post by: mawenzi on May 23, 2006, 06:04:10 PM
... very interesting ...
... and now php and html files should be still separated ... for different templates ...
... I think there is still a problem ... users can provide subcategorys under each category ... without restrictions ...  :?

edit:
... the link to editcategories.php should be in user_logininfo.html ... only for reg. users ... !
Title: Re: Allow users to add subcategories [MOD]
Post by: osuejm on May 23, 2006, 06:11:48 PM
thank you for your comment, although confusing.  Under my setup i use this mod for logged in users only.  And since I allow or deny which users can register onto my site, this is not a problem.  I can understand your point, but I am not that knowledgable to figure out how to integrate restrictions to specific categories yet.  I still dabble every now and again, but until then, as stated in my original post, use this mod at your own risk.
Title: Re: Allow users to add subcategories [MOD]
Post by: sm1rk on June 10, 2006, 08:18:34 AM
Is it works fine?
Title: Re: Allow users to add subcategories [MOD]
Post by: sm1rk on June 11, 2006, 03:07:05 PM
Вано, ну ответь ты хоть! Помоги русскому брату!
Title: Re: Allow users to add subcategories [MOD]
Post by: Stoleti on June 11, 2006, 05:56:50 PM
This would be nice if this use html separated of php !!! and like mawenzi said , in user_logininfo.html , ill be great  :wink:
Title: Re: Allow users to add subcategories [MOD]
Post by: firblazer on August 12, 2007, 06:13:11 AM
I have left in the information that i commented out as I did not want to corrupt my files in case i needed it later.  All i did then off my home.html template page is added a link off the menu to editcategories.php and it worked.

Hi! I have downloaded the files. But I am confused about how to get it to work. You mentioned about adding a link off the menu to editcategories.php. At which line in home.html should I include the link?

Thanks.
Title: Re: Allow users to add subcategories [MOD]
Post by: KillerCookie on August 15, 2007, 11:18:19 AM
Hello,
i´m looking for a mod that allows users to create categories, too. I´ll take look at the files provided in the first post an play around with them.

I plan to integrate that feature in one special category named "Upload" (or more if needed, but not everywhere) an there you´ll have a "create new category button" next to the upload button. In the next step i will add password protection and maybe an ACP integration.

Somebody interested in this mod? Then i´ll i do it with more comments and a step by step guide.

Yours sincerely Maik
Title: Re: Allow users to add subcategories [MOD]
Post by: thunderstrike on August 15, 2007, 01:36:10 PM
Is call: Members Category MOD ... obsolete. Need recode.
Title: Re: Allow users to add subcategories [MOD]
Post by: KillerCookie on August 15, 2007, 01:49:47 PM
Is call: Members Category MOD ... obsolete. Need recode.

You mean the MOD from V@no? But this MOD is not the thing i thought about. Not every member needs his own category but the members should have the possibility to create them (in the category the admin wants that feature).



My solution will be simple and the only protection is a password. Then everybody i gave the PW will be able to create sub-cats and upload the pictures there. I´ll move them to the right categories on my own with batch, copy, move, edit MOD later. So my clean categories wont get hurt by user uploads or new folders and the users can still upload their content.

Lets see if i can get it working...
Title: Re: Allow users to add subcategories [MOD]
Post by: thunderstrike on August 15, 2007, 01:53:07 PM
Quote
Then everybody i gave the PW will be able to create sub-cats and upload the pictures there.

What you ask - very special. I do for my gallery. ;)

Tip: Use moderator MOD + ajust level. Modify admin/admin_global.php, admin_functions.php, admin/index.php + admin/categories.php file.
Title: Re: Allow users to add subcategories [MOD]
Post by: KillerCookie on August 15, 2007, 04:22:01 PM
Quote
Then everybody i gave the PW will be able to create sub-cats and upload the pictures there.

What you ask - very special. I do for my gallery. ;)

Tip: Use moderator MOD + ajust level. Modify admin/admin_global.php, admin_functions.php, admin/index.php + admin/categories.php file.

That might be a solution but the Moderator MOD is bit... big... i´m always searching for easy things that do only what i wan´t and not much more.

But i´m interested... you already integrated the feature in your gallery? Maybe we can talk about that by PM?

BTW.: Where are you from?
Title: Re: Allow users to add subcategories [MOD]
Post by: thunderstrike on August 15, 2007, 07:04:49 PM
Quote
Maybe we can talk about that by PM?

Custom contract - something can think. ;)
Title: Re: Allow users to add subcategories [MOD]
Post by: KillerCookie on August 16, 2007, 11:00:20 AM
Quote
Maybe we can talk about that by PM?

Custom contract - something can think. ;)

You mean that you´ll do this as a paid MOD? If i´m right, what will that cost?
Title: Re: Allow users to add subcategories [MOD]
Post by: mawenzi on August 16, 2007, 12:19:13 PM
@KillerCookie
... like this here (http://klick.kl.funpic.de/files.php) ... Pos.10 "Add Cat by Users" ... ?
Title: Re: Allow users to add subcategories [MOD]
Post by: thunderstrike on August 16, 2007, 12:59:37 PM
Do no this site ... good for create MOD. ;)
Title: Re: Allow users to add subcategories [MOD]
Post by: KillerCookie on August 16, 2007, 05:49:17 PM
@KillerCookie
... like this here (http://klick.kl.funpic.de/files.php) ... Pos.10 "Add Cat by Users" ... ?

Description sounds good. I´ll have a look at this tomorrow.

*edit: Now i saw that i can´t download the file. Do i have to register at your site or can you send me the file otherwise?

Greetings
Title: Re: Allow users to add subcategories [MOD]
Post by: thunderstrike on August 16, 2007, 06:50:53 PM
Yes.
Title: Re: Allow users to add subcategories [MOD]
Post by: KillerCookie on August 17, 2007, 10:24:09 AM
Yes.

Yes to what?
Title: Re: Allow users to add subcategories [MOD]
Post by: thunderstrike on August 17, 2007, 10:27:10 AM
Quote
Do i have to register at your site or can you send me the file otherwise?
Title: Re: Allow users to add subcategories [MOD]
Post by: KillerCookie on August 17, 2007, 10:53:47 AM
I registered at the gallery but still can´t download the file... :(

*edit: Alright, alright... i wrote mawenzi a PN at his gallery. ^^

Title: Re: Allow users to add subcategories [MOD]
Post by: Tino23 on November 15, 2007, 10:09:29 PM
Hab die Dateien in mein Root Verzeichnis Kopiert, aber nach dem aufrufen der editcategories.php fehlen die Symbole.


Code: [Select]
$open_cat_link = '<img src="images/plus.gif" border="0">';
$close_cat_link = '<img src="mages/minus.gif" border="0">';

richtig müßte es doch heisen

Code: [Select]
$open_cat_link = '<img src="admin/images/plus.gif" border="0">';
$close_cat_link = '<img src="admin/images/minus.gif" border="0">';

wenn die Dateien ins Root Verzeichnis sollen oder?
Title: Re: Allow users to add subcategories [MOD]
Post by: thunderstrike on November 15, 2007, 10:22:18 PM
I no get German lang ... is possible for post english ?