Docskillz

The Good Stuff => SMF Arcade Support => Topic started by: Grammy on March 31, 2016, 07:58:00 AM

Title: Am I in the right place? :o\
Post by: Grammy on March 31, 2016, 07:58:00 AM
I went where I was directed and ended up at some financial site...  then somewhere called E-Arcade (which I don't think is correct).... and now I found this place...   so if I'm in the wrong place, please excuse me.    :blush:

My forum is  SMF 2.0.11, and it's right out of the box, not being used yet.  The only thing I did was use the package manager and installed SMF Arcade 2.5 RC3 and it seems to be working fine.  (So, I don't know why I just told you all that, ha.) 

I think my question must be skin-related.  I notice there are small icons that relate to the game category.  They are kept in a directory called arc-icons.  I was wondering what document calls for those and if they can be edited and if custom icons can be added?  One of the icons is called Puzzle.gif, so I ran a search within the Arcade folder and that name only appears as being found in the arc-icon folder.  There's no search result that ties it to any file and there are just so many files!  I wouldn't now where to begin. 

So, that's a lot of words to just ask...  can I edit those category icons and, if so, can you point me to the correct files? 

Thanks,
Grammy
Title: Re: Am I in the right place? :o\
Post by: Skhilled on March 31, 2016, 08:45:05 AM
Hi Grammy and welcome to Docskillz!  :cool2:

You can use any image editing program to edit any of the images or even create your own.

I just did a search and couldn't find anything relating to Puzzle.gif either! LOL It may be left over from a previous version. However, if you do see an image onscreen that you'd like to edit or even find information about it just right-click it and select "View Image Info".

The version I have here doesn't have category icons but it is the latest version. I know the arcade used to have it. I'd have to install that version and have a look cause I don't remember off-hand.
Title: Re: Am I in the right place? :o\
Post by: Skhilled on March 31, 2016, 10:37:51 AM
If I'm not on the right track please post an image of what you are talking about. :)
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 02, 2016, 09:05:59 AM
Oh, Hi and thanks for replying!  I'd actually forgotten I posted here because I'm bending my head around the ambitious project (for me, anyway) of using a table like a form and making it fillable.  It's kicking my butt, ha!  (I can't afford 400 bucks a pop for Adobe to use a fillable PDF and my version of Word is too old to have Ribbon, so I'm thinking of reworking a table with PHP.  Is that an invention, ha!?) 

Anyway...  I'm attaching a screenshot of the categories with the skin.  Only a couple of images actually show up, probably because my categories are named differently from what's in the files.  You can see Puzzle.gif.  But I could only find the image file in the zip, not where it is actually called for.  Very odd.

Thanks again!  :)
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 02, 2016, 11:22:37 AM
Quote from: Grammy on April 02, 2016, 09:05:59 AM
Oh, Hi and thanks for replying!  I'd actually forgotten I posted here because I'm bending my head around the ambitious project (for me, anyway) of using a table like a form and making it fillable.  It's kicking my butt, ha!  (I can't afford 400 bucks a pop for Adobe to use a fillable PDF and my version of Word is too old to have Ribbon, so I'm thinking of reworking a table with PHP.  Is that an invention, ha!?) 
A question...why are you not using a program specifically for coding like Notepad++ (https://notepad-plus-plus.org)...and it's free? You should never use Word, MS Notepad, etc. for coding. They will add extra and unnecessary coding to your files causing unexpected errors.

If you are creating images then use a good free program such a paint.net (http://www.getpaint.net/index.html) or GIMP (https://www.gimp.org/).

Or am I just looking at what you are trying to achieve all wrong?

Quote from: Grammy on April 02, 2016, 09:05:59 AM
Anyway...  I'm attaching a screenshot of the categories with the skin.  Only a couple of images actually show up, probably because my categories are named differently from what's in the files.  You can see Puzzle.gif.  But I could only find the image file in the zip, not where it is actually called for.  Very odd.

Thanks again!  :)
Ok, now I remember this a bit. LOL I'll install that version on a test site and see if I can track it down for you.
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 02, 2016, 10:20:16 PM
Thanks, I appreciate that!  Something's making the image appear but I just can't find what's calling for it!

I'll try to find some time tomorrow and show you the table I'm working on.  (I'm not where that laptop is just now.).  :)

Thanks again!
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 02, 2016, 10:22:41 PM
Look like I've just missed you. LOL

Ok, now I understand what you are trying to do. It would help if you give me a link to your site. If you are not ready to publicly announce it yet then PM it to me.

I've been busy all day and didn't make the test site yet. I'll do it tomorrow but now I need to rest.
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 03, 2016, 08:58:47 AM
I think I'm getting close...   I put the skin.php into a zip (for quick access) and attached here.  Would you mind searching it for category_pic with your file editor?  That's the only place I can find that seems to refer to category images (and I only found it by searching for gif).  But it still doesn't explain how a particular image gets assigned to a particular category.  For instance, Puzzle.gif.  If you search the entire SMF Arcade folder for the term Puzzle.gif the only search result is the actual image.  It's not specifically named in a file.  So...  this is a database thing?  (But how could it be, if there's no place in admin to assign an image when naming a category?) 

But..   when searching online for "SMF Arcade 2.5 RC3 category images", this link came up:

http://www.ourfamilyforum.org/FamilyForum/index.php?topic=2761.240 (http://www.ourfamilyforum.org/FamilyForum/index.php?topic=2761.240)

And YOUR name came up, ha!  Surprise, you're everywhere!   :)

There's a guy talking to you on that thread who seems to know how to do it, but he didn't say how.    :(
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 03, 2016, 02:11:02 PM
That file is the Jeza Skin template. I've searched it and it is not in there. Good idea...it could be in the db but I doubt it. Give me a minute and I'll setup that test site, sorry but it's been a very busy weekend.

That site belongs to a friend. I've been surfing the net for about 27-28 years so you're likely to find my name in many places. LOL
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 03, 2016, 03:09:03 PM
Ok, I think we've been going about this all wrong. After doing a little digging, I've realized that the categories belonged to the Jeza Skin Template only! That was not written very well by the original creator of that skin. Underdog/Chen Zhen has made edits but it does need a rewrite. He is also the one who keeps it updated.

Anyways, I noticed that "cat" or "category" was always in the code near "arc_icons" so I searched for "cat". I think you should be searching for one of these:

"arcade_game_cats"

"arcade_category"

"arcade_categories"

"category_pic"

Those seemed to be related to the icons...and categories in general. Particularly, lines 673 and 701 in skin.php.
Title: Re: Am I in the right place? :o\
Post by: Chen Zhen on April 03, 2016, 10:41:05 PM
Category icons go into the the arc_icons folder.
They must be gif image types and named like the category itself.
The file name must be "legal format" which means underscores are subbed for illegal chars and spaces.

ie. (Game Name = Game_Name.gif)

Old Games = Old_Games.gif
Classic!@Games = Classic__Games.gif

The code for this is in the ArcadeCats() function located in /Sources/Subs-ArcadeSkinA.php.
I haven't had much time to code but for future reference the ability to upload a custom pic via the cat admin should be implemented.

Regards.
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 04, 2016, 07:27:44 AM
I had found the images, themselves, by right-clicking on them and realizing that they are in the arc_icons folder but couldn't find the file that allows me to assign a specific image to a specific category.  But....   am I understanding correctly that this ability doesn't actually exist, but needs to be implemented in the future?  If so, I feel a little less inept, ha!   

:laugh:

I just kept sitting there, staring at Puzzle.gif actually appearing in the Puzzle category (and the same for Strategy) and wondering....  "Now how did he DO that?"
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 04, 2016, 07:42:50 AM
Yes, it is not implemented in the admin but should have been. Do you understand better now?
Title: Re: Am I in the right place? :o\
Post by: Chen Zhen on April 04, 2016, 08:35:15 AM
You can have icons for all your categories with the current version.
Just name your gif image type files accordingly as I described (case sensitive) and it will work for you.
I need to make it easier and more flexible in a future version is all I meant.
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 04, 2016, 08:48:43 AM
Yeah, we know. LOL
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 04, 2016, 09:04:35 AM
Quote from: Skhilled on April 04, 2016, 07:42:50 AM
Yes, it is not implemented in the admin but should have been. Do you understand better now?

Got it!  (Finally, ha!)   :laugh:
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 04, 2016, 09:06:38 AM
Quote from: Underdog on April 04, 2016, 08:35:15 AM
You can have icons for all your categories with the current version.
Just name your gif image type files accordingly as I described (case sensitive) and it will work for you.
I need to make it easier and more flexible in a future version is all I meant.


Okay, so even if I give a category a unique name that's not "standard" as long as the image has the exact same name (case sensitive) .gif, it should work.   Thanks!   ;)
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 04, 2016, 09:13:49 AM
It works beautifully!  (Once you find out how to do it, ha!)   :laugh:
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 04, 2016, 09:24:45 AM
Glad you've got it sorted out. :)
Title: Re: Am I in the right place? :o\
Post by: Grammy on April 04, 2016, 09:46:34 AM
Quote from: Skhilled on April 04, 2016, 09:24:45 AM
Glad you've got it sorted out. :)

The only caveat I'd offer to someone Googling this issue would be that there should be no spaces in a category name.  If you really have to have a two-word name, you have to include underscores or dashes in both the category name and the corresponding image, or the image won't show up.  (Which is what Underdog said, I just missed it.  Doh!)

Thanks so much!  Whew!   :)
Title: Re: Am I in the right place? :o\
Post by: Skhilled on April 04, 2016, 09:52:05 AM
Most file names for almost anything should not have spaces to be compatible with other software. You underscores or dashes and keep the capitalization the same unless otherwise noted. ;)