• [MOD] V1.3 Let users add (sub-)categories / User erstellen (Sub-)Kategorien 4 0 5 1
Currently:  

Author Topic: [MOD] V1.3 Let users add (sub-)categories / User erstellen (Sub-)Kategorien  (Read 246710 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] V1.3 Let users add (sub-)categories / User erstellen (Sub-)Kategorien
« Reply #45 on: September 27, 2007, 02:18:20 PM »
@KillerCookie
... danke für deinen Hinweis und die damit verbundene Klarstellung für alle zukünftigen MOD-User ...
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) ...

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] V1.3 Let users add (sub-)categories / User erstellen (Sub-)Kategorien
« Reply #46 on: September 27, 2007, 08:11:13 PM »
Ok, patch hour.

Quote
<select name="cat_parent_id" size="">
  <!-- At "value" enter a cat_id and next to it a cat_name / Bei "value" kann die Kategorie ID und daneben der Kategorie Name eingetragen werden -->
  <option value="18">Upload</option>
  <option value="your 2nd id / deine 2 id">your 2nd category name / der name deiner 2. Kategorie</option>
  <option value="...">...</option>
 </select>

No patch for this but please set with lang.

Replace:

Quote
$user_name = $user_info['user_name'];

for:

Code: [Select]
$user_name = format_text(trim($user_info['user_name']), 2);

Replace:

Quote
$new_cat_description = (isset($HTTP_POST_VARS['new_cat_description'])) ? strip_tags($HTTP_POST_VARS["new_cat_description"]) : "";

with:

Code: [Select]
$new_cat_description = (isset($HTTP_POST_VARS['new_cat_description'])) ? un_htmlspecialchars(trim((string)$HTTP_POST_VARS["new_cat_description"])) : "";

Replace:

Quote
$new_cat_description = $new_cat_description." [added by : ".$user_name."]";

with:

Code: [Select]
$new_cat_description = str_replace(array("{new_cat_description}", "{user_name}"), array(format_text(trim($new_cat_description), 1, 0, 1), format_text(trim($user_info['user_name']), 2)), $lang['new_cat_description_added_by']);

In lang/english/main.php file,

add on top ?>:

Code: [Select]
$lang['new_cat_description_added_by'] = <span class=\"smalltext\">{new_cat_description} [added by : {user_name}]</span>";
« Last Edit: August 27, 2011, 02:21:03 PM by thunderstrike »
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: [MOD] V1.3 Let users add (sub-)categories / User erstellen (Sub-)Kategorien
« Reply #47 on: September 28, 2007, 01:22:26 PM »
Ok, patch hour.

Quote
<select name="cat_parent_id" size="">
  <!-- At "value" enter a cat_id and next to it a cat_name / Bei "value" kann die Kategorie ID und daneben der Kategorie Name eingetragen werden -->
  <option value="18">Upload</option>
  <option value="your 2nd id / deine 2 id">your 2nd category name / der name deiner 2. Kategorie</option>
  <option value="...">...</option>
 </select>

No patch for this but please set with lang.

Dont know what you mean... The description is provided in german and english in the file itself and much better at my instructions. What do you mean with "set with lang"?

BTW: Instructions are up to date! / Anleitung ist wieder auf dem neuesten Stand!

Maik

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] V1.3 Let users add (sub-)categories / User erstellen (Sub-)Kategorien
« Reply #48 on: September 28, 2007, 01:31:11 PM »
Quote
What do you mean with "set with lang"?

Example: {lang_your_text} and in PHP - "lang_your_text" => $lang['your_text'] in register_vars ... and add $lang['your_text'] = ... in main.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 Melissa67

  • Newbie
  • *
  • Posts: 25
    • View Profile
I like this MOD, however, a user can add a new category to ANY user and not just themselves. Also, they are unable to delete their sub-category if they decide they no longer want it. Am I right?

Melissa

Offline KillerCookie

  • Newbie
  • *
  • Posts: 32
    • View Profile
I like this MOD, however, a user can add a new category to ANY user and not just themselves. Also, they are unable to delete their sub-category if they decide they no longer want it. Am I right?

Melissa

Hello Melissa67,

in this first version of addcat the categories aren´t dedicated to the user who created them. This means that every user can add every category he likes. You can give _all_ users the right to delete the new categories but this will mean big trouble if someone deletes all cats. If you just want to give the users a personal cat then please search for "personal category mod".

So... what to do about that?

It is possible to create each category as "private" and give the current user all rights for his new category, but i need to add some code for that and i haven´t too much time at the moment. With this feature you can manage the rights perfectly...

If you got some other nice features which should be included in the next version so feel free to post them here and i´ll have a look at them.

Maik


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Quote
please search for "personal category mod".

Obsolete support for this MOD and no work for last 4images version I 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 skidpics

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
I like this MOD, however, a user can add a new category to ANY user and not just themselves. Also, they are unable to delete their sub-category if they decide they no longer want it. Am I right?

Melissa

Can you limit the creation of categories in one main category only, such as 'user galleries',and the users create sub categories ONLY in that category?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Can you limit the creation of categories in one main category only, such as 'user galleries',and the users create sub categories ONLY in that category?

... yes ...
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) ...

Offline KillerCookie

  • Newbie
  • *
  • Posts: 32
    • View Profile
I like this MOD, however, a user can add a new category to ANY user and not just themselves. Also, they are unable to delete their sub-category if they decide they no longer want it. Am I right?

Melissa

Can you limit the creation of categories in one main category only, such as 'user galleries',and the users create sub categories ONLY in that category?

You have to write all the allowed categories into the script by yourself (see instructions) so you got perfect control of it. All the other features will be included in V2.0 which will be released soon.

Maik

Offline Fryz

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Fryz' Media Galerie
Mal ne Frage:

Wenn ich $lang['new_cat_description_added_by'] = <span class=\"smalltext\">{new_cat_description} [hinzugefügt von: {user_name}]</span>";
in die main.php einfüge, bekomme ich folgenden Fehlerhinweis:
Parse error: syntax error, unexpected '<' in /usr/export/www/vhosts/funnetwork/hosting/fryz/4images/lang/deutsch/main.php on line 879


Was hab ich falsch gemacht?



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Quote
Parse error: syntax error, unexpected '<' in /usr/export/www/vhosts/funnetwork/hosting/fryz/4images/lang/deutsch/main.php on line 879

Please post from lang/deutsch/main.php - line 875 to line 885.
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 Fryz

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Fryz' Media Galerie
This mod is the last I installed. so the following lines are the last I put in:

line 875-881

$lang['addcat_error'] = 'Das Formular wurde nicht korrekt ausgefüllt, bitte erneut versuchen.';
$lang['addcat_ok'] = 'Ihre Kategorie wurde erfolgreich erstellt!';
$lang['addcat_no_rights'] = 'Sie besitzen nicht genügend Rechte zum Anzeigen der Seite!';

?>

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
I say post 875-885 and you post 875-881.  :roll:
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 Fryz

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Fryz' Media Galerie
I say post 875-885 and you post 875-881.  :roll:

sorry, but  there is nothing else, it end's at line 881