Advertisement:

Author Topic: [2.1] Upload / delete / separate folder for stars  (Read 31232 times)

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
[2.1] Upload / delete / separate folder for stars
« on: November 08, 2012, 04:29:47 PM »
I see that every time I add a rank. I have to remember what the file name is. and I have to use FTP client to log in and check the themes/images folder for what ranks I have. I was thinking that this would be a good idea.

Instead of that. Create a new folder calls ranks\ and let it list all the images and we just pick the one that we want. That way I don't have to remember the file names. It would be an idea to add this all so to themes too. In the theme folder create a new folder called ranks. What ever theme the Admin is using. He/she can choose a rank from a drop down list.

Thanks
Joe

SMF Forums http://www.df-barracks.com Where gamers go.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.1] Upload / delete / separate folder for stars
« Reply #1 on: November 09, 2012, 10:14:54 AM »
So... make things more complex, structure wise?

Why not just name all your rank badges: rank_BLAH, rank_BLEH, rank_BLOH?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: [2.1] Upload / delete / separate folder for stars
« Reply #2 on: November 09, 2012, 10:49:52 AM »
So... make things more complex, structure wise?

Why not just name all your rank badges: rank_BLAH, rank_BLEH, rank_BLOH?


well that doesn't all ways work like that. I can't all ways remember what I uploaded and the names of what I uploaded. and I don't think you have to change other then one page any way. Just have it to a opendir and list the files ranks folder. and pick the one you want. I done this in many projects that users wanted this option. Sense it's in PHPBB3 I don't see why not add it to SMF.

SMF Forums http://www.df-barracks.com Where gamers go.

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: [2.1] Upload / delete / separate folder for stars
« Reply #3 on: November 09, 2012, 12:07:18 PM »
I could see this being useful in the same way that selecting a topic icon works. Allows you to see what badge you've selected and what they look like, without having to remember filename etc.
IchBin™        TinyPortal
Coding Guidelines       

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: [2.1] Upload / delete / separate folder for stars
« Reply #4 on: November 09, 2012, 12:12:38 PM »
I could see this being useful in the same way that selecting a topic icon works. Allows you to see what badge you've selected and what they look like, without having to remember filename etc.

Thank you, I all so agree, This would be. Just some thing that would list them and then you could pick the one you wanted from a <select><option>filename.jpg</option></select>

I was thinking about how I did this before. and I not sure. But if you use an $ranks =  opendir($themes_url.'ranks/*.*); or some thing like this. and then add them to a <select> and them we would just have to pick the one we want. It's better then guessing.

SMF Forums http://www.df-barracks.com Where gamers go.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #5 on: November 10, 2012, 10:16:07 AM »
I have seen so many questions about stars, how to upload etc.

I think stars should have their own folder system, as well as a download system. A simple download button and a div that lists current stars available.

This could be achieved with few lines of code. Just look how simple the upload for new smilies is done.

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: [2.1] Upload / delete / separate folder for stars
« Reply #6 on: November 12, 2012, 09:11:15 AM »
Yes, The same option applies to stars all so. Any thing related to ranks.
SMF Forums http://www.df-barracks.com Where gamers go.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #7 on: November 12, 2012, 09:16:24 AM »
Why were these two topics merged? They are unrelated!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.1] Upload / delete / separate folder for stars
« Reply #8 on: November 12, 2012, 09:23:31 AM »
no they are no unrelated.

BigJoe's request:
create a separate folder for rank images

Your request:
create a separate folder for rank images.
Also create the ability to manage the rank images through the admin interface.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #9 on: November 12, 2012, 10:04:24 AM »
By rank images, he means stars for Regular groups and Post count based groups?

Your request:
create a separate folder for rank images.
Also create the ability to manage the rank images through the admin interface.
It isn't really a request. The choise of star images has clearly never been finished by the devs.
« Last Edit: November 12, 2012, 10:14:38 AM by Akyhne »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.1] Upload / delete / separate folder for stars
« Reply #10 on: November 12, 2012, 10:13:58 AM »
yes
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #11 on: November 12, 2012, 10:21:33 AM »
I already made a page to list MG icons and what theme they are missing in. It only needs a copy/upload system in the bottom.
And of course a dropdown where you select MG icons, instead of the current input field where you just write a file name.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #12 on: November 12, 2012, 10:31:49 AM »
It's a great benefit in this particular situation, that themes for SMF 2.0.x and down are not adaptable to 2.1 directly, and that the files are renamed to something else.
This gives the oppertunity to also move the files to a separate folder. They really shouldn't be in the 'Images' folder, but in a separate folder like most other images.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #13 on: November 13, 2012, 08:57:25 AM »
Icons can be deleted by simply doubleclicking on them.

New icons can be uploaded to all themes or individual ones. They can be renamed during upload and you can decide if you want to replace existing files.

Only needs a copy system now.

But why am I doing all this? I can't even make a mod out of it (and won't)?! Guess I'm just bored!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.1] Upload / delete / separate folder for stars
« Reply #14 on: November 13, 2012, 11:23:03 AM »
nice screen shots.... are you going to contribute the code to the branch/trunk?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #15 on: November 13, 2012, 11:44:02 AM »
If I can figure it out. If you want to see/test it live, give me a nudge.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,846
  • Master of BBC Abuse
Re: [2.1] Upload / delete / separate folder for stars
« Reply #16 on: November 14, 2012, 02:49:58 PM »
I have seen so many questions about stars, how to upload etc.

I think stars should have their own folder system, as well as a download system. A simple download button and a div that lists current stars available.

This could be achieved with few lines of code. Just look how simple the upload for new smilies is done.

Problem: what if you want theme-specific icons? Before you say "Nobody will ever want that", it's something I have already done for custom themes, and I'm not the only person who has done it. Pulling them from one folder via one setting isn't going to allow that. Quite honestly, I'd really prefer the "stars" to stay as part of the theme, the way they are now.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.1] Upload / delete / separate folder for stars
« Reply #17 on: November 14, 2012, 03:06:33 PM »
ant...

yes. I don't think that anyone has suggested that be changed.
They are asking that the stars and other rank images be placed in a SUBdirectory of images rather than directly in the images root....
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,846
  • Master of BBC Abuse
Re: [2.1] Upload / delete / separate folder for stars
« Reply #18 on: November 14, 2012, 03:12:33 PM »
I can see it being fun to write an interface that'll handle all that. :)

You can do the folder already if you want to. Admin just assumes theme_url, but anything after that is entered manually into the input window, so people can put the stars in whichever folder they like. You could call them from images/theme/superfluous_directory/hey_another_one/oh_looky_we_haz_starz_here if you wanted to. It'll make no difference to SMF.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #19 on: November 14, 2012, 03:28:03 PM »
Eh... we are just suggesting a sub folder of the images folder of each theme. So moving stars to their own subfolder of /images, like almost all other images have their own folder.

Interface? Uhm, that's already done: http://www.simplemachines.org/community/index.php?topic=490266.msg3436984#msg3436984

Wasn't a big task, really. It looks in the folder /images/star_icons/ of each theme installed and list the images, then compares the lists from each theme and show them.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #20 on: November 14, 2012, 09:03:50 PM »
Ok, this is the final.

The top table shows what icons are available at all in the stars_folder. It lists what icon membergroups and post groups uses, as well as telling you if a membergroup is missing an icon for a specefic theme.
If you look closely (friend), you can see that each theme can has its own icons ;)

If a group is missing its icon in any theme, a red warning shows below the table with the name(s) of the groups and a lin to edit the groups.

You delete an image by doubleclicking on it. It will only delete that image in that theme, not in all themes.
You copy an image, by dragging it to the empty spot (Image Missing or N.A spots) and it will be copied there.
Both actions above, will ask you if you want to continue.

You upload a new icon in the bottom. You can choose to upload the icon to all themes at once, or chose individual themes. You can rename the file in the upload process, so you don't have to rename it on your PC first. You can't convert it to another format, though!
By checking the "Overwrite existing file(s)", you will overwrite any present file that exists. If it isn't checked, it will only upload to themes where the image is not present.
« Last Edit: November 15, 2012, 12:23:08 PM by Akyhne »

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #21 on: November 15, 2012, 03:20:46 PM »
nice screen shots.... are you going to contribute the code to the branch/trunk?
Commited. Only, I haven't created the subfolder and moved the icons there, because I can't figure out how to move files and create folders within Github.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,846
  • Master of BBC Abuse
Re: [2.1] Upload / delete / separate folder for stars
« Reply #22 on: November 15, 2012, 03:34:34 PM »
TBH I think having double click for deletion is not a good idea. Double click is usually the way of opening files, not deleting them, so I think we should stick with what people will expect. Having a delete icon or something would be better IMO. That's a small detail though and easy enough to change.

Personally I don't really care if Spuds wants to use this or not. If it works without bugs it's fine with me, but if it doesn't make the cut I wont miss it. :)

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #23 on: November 15, 2012, 03:46:05 PM »
I thought about adding a delete link or image and a copy link or image for those features, but it went to look to cluttered. So I made it like I did.

I see no issues with the way I did it, though. One would never doubleclick an image for any reason i a table, except if they knew they could do it. And you are also asked if you want to do it! No big issue.
However, it is very easy to add a link or an image instead, takes one line of code extra!

Maybe you won't miss it, but you will love the fact that you can now just click the image in a membergroup profile, to change it and see what images are available. And don't tell me you in the future will use FTP to upload new images, when you can do it with a few clicks... unless you also prefere to upload new smiles the same way!
I'm sure you just need to try it live to get your stubborn Australian head to like it ;) Test account can be PM'ed.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,846
  • Master of BBC Abuse
Re: [2.1] Upload / delete / separate folder for stars
« Reply #24 on: November 18, 2012, 07:16:47 PM »
Y'know TBH, I think what would be far more useful to most people is a menu manager. Editing arrays is a freaky thing for a lot of admins, even if people like us can do it in their sleep. It's also something that needs to be done relatively frequently, particularly compared to things like changing group icons.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #25 on: November 18, 2012, 08:22:01 PM »
That would be usefull too. And not to hard to do, really. Those menu editors I've seen, overcomplicates things IMO.

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: [2.1] Upload / delete / separate folder for stars
« Reply #26 on: November 18, 2012, 08:48:07 PM »
Icons can be deleted by simply doubleclicking on them.

New icons can be uploaded to all themes or individual ones. They can be renamed during upload and you can decide if you want to replace existing files.

Only needs a copy system now.

But why am I doing all this? I can't even make a mod out of it (and won't)?! Guess I'm just bored!

Have you thought of adding this to the request mods forum. It sounds like a good idea. Sense your topic and my topic were merged. No one is commenting on my topic. If you know how to create mods. Then I wish you would add this option to a mod. It would be so cool if SMF would add this in as part of the source code.

My idea what to list all the ranks in a drop down list and then pick the one you wanted to use. With out remembering the file name.

The icons is your ideas. and I think it would be worth a shoot to try. And include the images all so in that folder all so.

See again the other idea i had was to put these images, Ranks and icons in there own folder. don't mix them up in one folder. Then have a section that where we can, Add,edit and delete these images. as well as the ranks all so. That would be a cool mod to add. Like I said before. I hate having to have to guess at the file name.

SMF Forums http://www.df-barracks.com Where gamers go.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #27 on: November 18, 2012, 08:57:51 PM »
No, I'm not going to add this as a mod. But I made a pull request to the SMF 2.1 branch, which basically means the team just has to accept that and it will be part of the next SMF version.
If they don't, well then I just wasted my time. No big deal, but I wouldn't understand it. To me, this isn't a feature request, it's just finishing something that was clearly never finished.

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: [2.1] Upload / delete / separate folder for stars
« Reply #28 on: November 18, 2012, 09:28:34 PM »
No, I'm not going to add this as a mod. But I made a pull request to the SMF 2.1 branch, which basically means the team just has to accept that and it will be part of the next SMF version.
If they don't, well then I just wasted my time. No big deal, but I wouldn't understand it. To me, this isn't a feature request, it's just finishing something that was clearly never finished.

I agree, It should be added sense SMF doesn't have any thing like this.
SMF Forums http://www.df-barracks.com Where gamers go.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #29 on: November 18, 2012, 09:49:08 PM »
You can see here how it works: http://youtu.be/AKI5RZB_JFw

I asume by rank icons, you mean post group & membergroup icons.

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: [2.1] Upload / delete / separate folder for stars
« Reply #30 on: November 18, 2012, 09:56:14 PM »
You can see here how it works: http://youtu.be/AKI5RZB_JFw

I asume by rank icons, you mean post group & membergroup icons.

Well when you setup ranks for each group. It's in the "Users Ranks" or "Stars" If you modify a group. You will see what I have in this image below. I just want a drop down combow box to pick the image or rank I want to use. No more guessing.

SMF Forums http://www.df-barracks.com Where gamers go.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: [2.1] Upload / delete / separate folder for stars
« Reply #31 on: November 18, 2012, 10:03:24 PM »
Well, that textbox is what I have replaced with a "drop-out" and using, in the first part of the video.

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: [2.1] Upload / delete / separate folder for stars
« Reply #32 on: November 18, 2012, 10:06:42 PM »
Well, that textbox is what I have replaced with a "drop-out" and using, in the first part of the video.

Yes I know, I saw that. That's what I want.
SMF Forums http://www.df-barracks.com Where gamers go.