• [MOD] User Categories Area 5 0 5 1
Currently:  

Author Topic: [MOD] User Categories Area  (Read 90359 times)

0 Members and 1 Guest are viewing this topic.

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] User Categories Area
« Reply #30 on: February 20, 2010, 10:29:11 AM »
In your first post, you note:

Quote
Could not remember link of mod that I used but it was the auto resize mod with big folder mod
(if you need to use make sure you add all of this mod to your site first)

Hi -

Are you referring to this MOD:
http://www.4homepages.de/forum/index.php?topic=7700.0 ?

I installed this in my new install of 1.7.7 and it works fine.

Now, my question, in following your instructions ... should I install your MOD first before I install this other MOD?  That would mean I should reinstall a clean version of 4images and start with your MOD first ...

Being new to 4images, there doesn't seem to be a protocol on how to install MOD's, one after another ...

Thanks,

Brian

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] User Categories Area
« Reply #31 on: February 20, 2010, 03:27:25 PM »
Yes, that is the Mod I was referring to...
I would install it first before installing mine.

Yes Mods are a little confusing to deal with but they are worth the effort
Buddy Duke
www.budduke.com

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] User Categories Area
« Reply #32 on: March 24, 2010, 08:02:05 PM »
Hi -

This is the last of the MOD's to install before our gallery goes live.

I have had very good success installing almost every MOD, now counting 17 I think.  Beyond that, I had to uninstall (2) additional MODs that did not work well or had unresolved glitches: flash tag cloud and Shout/Guest Comment Box. I mention this to show I have a certain level of competence.

I have read and reread your notes for this MOD and my biggest question is whether I have to install the Thunderstrike version of MultiUpload. I have already uploaded the V@no multiupload version, multi-upload plus v.03b, topic 12742.0, and I am concerned that having both would be a problem for our users let alone for the script..

Can this MOD work using the V@no multi-upload plus v.03b, topic 12742.0 for uploading multiple images? 

Thanks for your thoughts on this.

Cheers,

Brian

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] User Categories Area
« Reply #33 on: March 25, 2010, 01:04:35 AM »
@ surferboy,
The thunderstike version of multiupload is already integrated into this mod. I renamed the files so they would not cause any issues if both were loaded. So, No, you do not have to install that Mod.
I tried V@no's version once a couple months back but could not get it to work reliably for my taste, (maybe I just did not spend enough time with it)
When something acts different when bouncing between different browsers then I get discouraged.
I would say yes, both V@no's and mine can be installed at the same time but I do not think V@no's multiupload mod will not be called on when your users are in their categorie area.
I have not looked into testing that Mod out with mine.
When your site is up and running, I would love to see that version of multiupload running so I can see how it works.
Buddy Duke
www.budduke.com

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [MOD] User Categories Area
« Reply #34 on: March 25, 2010, 03:33:48 AM »
Hi -

Thanks for your reply.

Great!  I will send you an IM right now so you can have access to the gallery while under construction.  I would very much appreciate your taking a look because my concern is that I have a link in the userbox that says 'upload your images' which is V@no's mutliupload basic MOD.  If a user clicks on the link, he/she will go to the User Control Panel to proceed with selecting a category, choosing the number of images, and so on.  You will see in the home page that I have created a placemarker for the User Category. 

After I install your MOD, I assume that the only way the users will be able to see and access the User Category is through your MOD's link in the userbox.

Otherwise, that is where I see a conflict: a user clicks on V@no's link, goes to the Control Panel, and not knowing any better, looks for the User Category, and if it is visible, selects it, and then proceeds.  Hopefully my logic is correct - that the user will not see the User Category in the dropdown menu of V@no's mutliupload form and they will just use your link from your MOD in the userbox. 

Thanks for taking the time to look at this .

Oh, one other question:  I already have the MOD V1.3 Let users add (sub-)categories installed. Will that installation conflict with your MOD?  Given your answers to the previous post, I assume it will not since you said you had renamed the files but I just want to be sure.

Thanks again,

Brian

Offline alex9193

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: [MOD] User Categories Area
« Reply #35 on: June 19, 2010, 11:32:24 AM »
[MOD] User Categories Area was installed without any problems, but I have MOD Google Friendly Urls For 4images Best Seo Mod, that's why when I use the link [Your User Area] I get the following URL http://127.0.0.1/4images/user_cat.htm, well, I inserted it manually http://127.0.0.1/4images/user_categories.php, and I'm redirected to the page [Your User Area] when you see so to say "base category" id=127, although I created in the base category another category Upload with id=2940, when I use the link [Add Subcategory]
I'm redirected to the page http://127.0.0.1/4images/user_categories.php?action=addcat&cat_parent_id=127 where, of course, I do not have rights to do anything. I change id=127 manually to id=2940 and am redirected to the right page for adding category, but here all buttons redirect me again here http://127.0.0.1/4images/user_cat.htm

Please, advise how to install the right base category, not id=127 and how to avoid conflict with [MOD] Google Friendly Urls For 4images Best Seo Mod


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] User Categories Area
« Reply #36 on: June 19, 2010, 06:37:49 PM »
Try this.
In includes/sessions.php find:
      elseif (strstr($url'categories.php')) {

Insert above:
      elseif (strstr($url'user_categories.php')) {
        
// do nothing
      
}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline alex9193

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: [MOD] User Categories Area
« Reply #37 on: June 19, 2010, 09:50:07 PM »
Thank you, V@no! It works!
One more thing, how to solve the problem with opening of a necessary base category? Maybe it's possible to write the needed ID in the file
user_categories.php, so if you add a category the following page opens
http://127.0.0.1/4images/user_categories.php?action=addcat&cat_parent_id=127 and not
http://127.0.0.1/4images/user_categories.php?action=addcat&cat_parent_id=XXXX

« Last Edit: June 19, 2010, 11:24:30 PM by alex9193 »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] User Categories Area
« Reply #38 on: June 20, 2010, 01:35:50 AM »
@ alex9193,
I am glad V@no was able to help you with the google friendly codes because I have no knowledge in that dept.

if you are seeing user_cat.htm (that file has nothing to do with this mod, I posted that to another user up this list. Make sure you are not getting any mod's coding intermixed in some way)

I am trying to understand your other issue. Let me explain how it is suppose to work and then we can troubleshoot it from there.
When you first setup the user_categories in the admin panel you select a base_cat area on your site, I am assuming that is category #127.
The user has a "0" entered in for their base category when the mod is first started.
When the user clicks on their user area and the code sees that they have a "0" in their field and they say yes to creating a user area for themselves, then the code creates a subfolder for them under that #127 category. That sub-folder becomes that users base parent category, in your case I am assuming #2940.
That also becomes the number that is stored for that user in the admin control panel.
Now, from that point on, when that user clicks on their user area, the parent category will always be #2940 and not #127.
You are correct, they only have rights for any folders under their base category and not the main category that houses everybody.

Is this how your site is working? after all the changes you have made with the google friendly stuff, you may try deleting all user folders, place a "0" in your users properties in the control panel and make sure you have category #127 set for the main overall category to house all your user's folders.
Then click on the "user area" for that user and see if it creates it correctly and sets their main parent category correctly.

Hopefully this helps,
Let me know if you are stuck or do not understand...
« Last Edit: June 20, 2010, 01:36:46 PM by budduke »
Buddy Duke
www.budduke.com

Offline alex9193

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: [MOD] User Categories Area
« Reply #39 on: June 20, 2010, 03:33:29 PM »
budduke,
I'll try to explain more detaily. I have 6 main categories on my website (pic. 1)

I created category 7 Upload ID=2940 which I want to be the base category for users areas, but it doesn't work.
If the category Upload is a base category in my settings, another category with ID=127 (which has been already used) becomes base category.
If I set ANY category with ID < 128 as a base category, it works without any problems, id ID is bigger, so category ID=127 automatically becomes
a base category.  
If I set "no categories", a category with a smaller ID is a base category (in my case it's ID=15) (pic. 2)
« Last Edit: June 20, 2010, 06:02:44 PM by alex9193 »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] User Categories Area
« Reply #40 on: June 20, 2010, 04:41:11 PM »
@alex9193,

 :oops:  that is my bad. Just looked at the code in the zip file that creates the field for the user_submitted_parent and it was set for tinyint which only give you -127 to 127 for a value. Hard to believe this is the first time this came up. UPDATE: I did fix this once before but when I created the version 2, I accidentally used the old code again... :(

if you know how to use phpmyadmin to run a command on your database, run this command...
Code: [Select]
ALTER TABLE `4images_users` CHANGE `user_submitted_parent` `user_submitted_parent` MEDIUMINT NOT NULL DEFAULT '0' remember to change the 4images_users with your name of your user's table...

that will give you 8388607 for a max value on categories and still keep data small in the database...

I am so sorry for that, I have fixed the zip file again and replaced the installer with the correct one for the database changes
« Last Edit: June 20, 2010, 04:53:43 PM by budduke »
Buddy Duke
www.budduke.com

Offline alex9193

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: [MOD] User Categories Area
« Reply #41 on: June 27, 2010, 01:49:13 PM »
budduke,
thanks, it works as it's supposed to! :)


I have a couple of questions:
When creating a new user area everything works fine (showing of user areas, multiupload work with different languages), but adding
of new areas doesn't work (it's possible to change the language only in captcha).
1. Is it possible to add other lanuage files?
2. In the form field descriptions are taken from the file admin.php, it is possible to move them into файл main.php?

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] User Categories Area
« Reply #42 on: June 27, 2010, 09:08:55 PM »
I have a couple of questions:
When creating a new user area everything works fine (showing of user areas, multiupload work with different languages), but adding
of new areas doesn't work (it's possible to change the language only in captcha).
1. Is it possible to add other lanuage files?
2. In the form field descriptions are taken from the file admin.php, it is possible to move them into файл main.php?

Not sure if I understand what you are asking or not :?:
question 1: If you can translate the English words, you should be able to create language files for your language.

question 2: Why? the lang/admin.php file is used in the admin control panel area of the site and the lang/main.php is used for the normal users of your site.

Are there words that I may have forgotten to put in there that you can not translate?
Buddy Duke
www.budduke.com

Offline alex9193

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: [MOD] User Categories Area
« Reply #43 on: June 28, 2010, 07:50:57 PM »
1. I have 3 languages, but when you create a subcategory, language variables are taken from default language. 
2. My default language is english, but admin area is in Russian (to make it comfortable I just moved adnin.php from he other language), that's why
default language is English but if you add subcategories some Russian words appear.
3.(additionally) If you open multiupload page, the language which was previously chosen by the user is automatically changed to default language.
You can see it here:

http://max-pix.com
login: test
pass: 123456   

Try to change languages on the page where you create subcategories.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] User Categories Area
« Reply #44 on: June 29, 2010, 12:19:54 AM »
@ alex9193,
To answer questions 1&2...
You need to convert the entire main.php file over to your new languages and not just what was part of my mod.
I am reusing lang variables that are further up that file as to not overload memory having the same words created twice...
look up the main.php file for things like "yes" "no" "abort" ,ect... That is why you are seeing russian because if the multilang mod does not see the associated word in the new language file it is using, it uses the original one that is in the default settings of  4images.

Question 3 is harder,
The multilanguage mod you are using places a l=whateverlanguage at the end of every link. My mod does not incorporate that into any of it's links, that is why it defaults back to the default language when you click on any of the links. It would have been nicer if that mod passed a session variable instead of adding to the link.
I think V@no created that mod, you may ask him on that mods posing to see if there is an easy fix to add multilang to this mod. I think I would have to go through and modify almost all the code to get it in there and then people that are not using the multilang will not work.

Will have to think about that one awhile, If I come up with anything I will post it for you, or if V@no chimes in with a path for me to take then I may be able to move forward with it. But right now, I can not think of a way to put it in easy and still make it compatible for people not using that mod.

If I get time this week, I will try to place that mod on my test site and see what I can do, must no promises...
If you can zip and send me language files you are using so I will not have to create the different languages, that would help out allot.

Playing around on your site, I did notice two words that are in my templates that are not in the language file  :(
"UPLOAD:" and "URL:" and then the button you click for browsing for files is also in English but I do not think I can do anything about that one.
Buddy Duke
www.budduke.com