Author Topic: Allow users to add subcategories [MOD]  (Read 26392 times)

0 Members and 1 Guest are viewing this topic.

osuejm

  • Guest
Allow users to add subcategories [MOD]
« 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!

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #1 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 ... !
« Last Edit: May 23, 2006, 06:35:03 PM by mawenzi »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

osuejm

  • Guest
Re: Allow users to add subcategories [MOD]
« Reply #2 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.

Offline sm1rk

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #3 on: June 10, 2006, 08:18:34 AM »
Is it works fine?

Offline sm1rk

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #4 on: June 11, 2006, 03:07:05 PM »
Вано, ну ответь ты хоть! Помоги русскому брату!

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #5 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:

Offline firblazer

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #6 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.

Offline KillerCookie

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #7 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

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #8 on: August 15, 2007, 01:36:10 PM »
Is call: Members Category MOD ... obsolete. Need recode.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline KillerCookie

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #9 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...

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #10 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.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline KillerCookie

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #11 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?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #12 on: August 15, 2007, 07:04:49 PM »
Quote
Maybe we can talk about that by PM?

Custom contract - something can think. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline KillerCookie

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #13 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?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Allow users to add subcategories [MOD]
« Reply #14 on: August 16, 2007, 12:19:13 PM »
@KillerCookie
... like this here ... Pos.10 "Add Cat by Users" ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...