Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Sun Jul 10, 2011 5:17 pm Reply with quote

Hello all,

I installed NSNGD with no problems, but the down-logo.gif image is replaced by logo.png. I design themes and websites for other people and I always create a down-logo.gif and link-logo.gif for each separate theme to compliment it. I desperately need to be able to continue adding the down-logo.gif image in the themes image file.

If you could give me a fix for that I would appreciate it. Thanks,

Mike
 
View user's profile Send private message
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Sun Jul 10, 2011 7:34 pm Reply with quote

papamike wrote:
Hello all,

I installed NSNGD with no problems, but the down-logo.gif image is replaced by logo.png. I design themes and websites for other people and I always create a down-logo.gif and link-logo.gif for each separate theme to compliment it. I desperately need to be able to continue adding the down-logo.gif image in the themes image file.

If you could give me a fix for that I would appreciate it. Thanks,

Mike


I found the function but am ignorant about how to point it to themes/'.$themeSel .'/images/down-logo.gif. When I change the $imgfile it still points back to the Downloads module. Originally $myimage = 'themes/' . $ThemeSel . '/images/downloads/' . but there is no such path within a theme. My question is: How would I effectively define $imgfile without having it replace every image on the downloads page with the logo image?
Thanks,
Mike
Code:

function myimage($imgfile) {
   global $module_name;
   $ThemeSel = get_theme();
   if (file_exists('themes/' . $ThemeSel . '/images/' . $imgfile)) {
      $myimage = 'themes/' . $ThemeSel . '/images/' . $imgfile;
   } else {
      $myimage = 'modules/' . $module_name . '/images/' . $imgfile;
   }
   return ($myimage);
}
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Jul 10, 2011 9:11 pm Reply with quote

Papamike,

Unfortunately, it looks as though I will need to make a permanent change in the code to make it easier for theme designers to provide theme specific images. You have found the right code and path, but the specific download icon in question is buried within the menu() function here within the modules/Downloads/includes/nsngd_func.php script:

Code:

function menu($maindownload) {
   global $module_name;
   OpenTable();
   $myimage = myimage('logo.png');


There are quite a few images within the Downloads module. Is it just this one logo.png that is an issue or do all the images need to be module specific. I.e., would it be better to prefix all the images with either:

tndl- (this would be very specific to this module)

or

down- (possibly a little more generic and could collide with others?)

Your thoughts?

Regardless, I am going to have to change code and all the necessary images, so this is going to take another separate release.
 
View user's profile Send private message Visit poster's website
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Sun Jul 10, 2011 9:42 pm Reply with quote

That snippet is the problem. It is pointing to the Downloads module and it should point to themes/$ThemeSel/images/down-logo.gif
That's the only image that is affected as far as I know.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Jul 10, 2011 10:30 pm Reply with quote

The issue isn't the path, but the name. So, if I were to rename it from 'logo.png' to 'down-logo.png' it would first attempt to find it in:

themes/$ThemeSel/images/

and if not in there, it would then look to the Downloads module images directory.

I prefer to use PNG files over GIF by the way.

I could also make that image name a configuration item if you think that would be helpful. Since it would require a DB table change, though, I would have to reserve that for a non-patch release (e.g., 1.2.0)

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Sun Jul 10, 2011 10:43 pm Reply with quote

I can tell you this Rob, this is one HOT ticket item. It definitely needs to be promoted. I'm gonna place something on my site about it. When I started digging around in the blocks I uncovered a lot of goodies.

Right now I think it's set to accept .gif files only. I myself would rather use .png too. I do think that the configuration items are always winners.

Is there a way to add the settings for it to the Downloads Configuration, or do you already have that in mind.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Jul 10, 2011 11:23 pm Reply with quote

papamike wrote:
I can tell you this Rob, this is one HOT ticket item. It definitely needs to be promoted.


Can you be more specific or say this in another way? I am not certain exactly what you are saying here. I just don't want to assume anything. Thanks.

Quote:
When I started digging around in the blocks I uncovered a lot of goodies.


Maybe your answer to the above will help me understand this as well. Just trying to gather whether there is more work in the blocks that I am not aware of?

Quote:
Right now I think it's set to accept .gif files only.


Sorry, but I don't get what you mean. All of my Downloads images are PNG. So, if you want to override them with theme-specific images, you would simply need to provide those with the theme?

Quote:

Is there a way to add the settings for it to the Downloads Configuration, or do you already have that in mind.


Exactly what I was thinking, but that is way too off in the future as that requires a more significant release. I need to keep my dot-dot level revs as script changes only... no DB changes. Wink
 
View user's profile Send private message Visit poster's website
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Mon Jul 11, 2011 12:05 am Reply with quote

Quote:
I can tell you this Rob, this is one HOT ticket item. It definitely needs to be promoted.

I mean that the Downloads mod is so good that it needs to be recognized by more people.

Quote:
When I started digging around in the blocks I uncovered a lot of goodies.

Just making an attempt at telling you how good and full of features your download blocks are.

Quote:
Right now I think it's set to accept .gif files only.

Meaning the Downloads title image is set for .gif files.

The last one is just a distant thought. I know it takes time. Sorry for my ill attempt at specificity. Just trying to make a feeble attempt at stating just how good your work is....

I'll have to spend more time typing and being more specific in the future.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon Jul 11, 2011 8:38 am Reply with quote

Ok sir. Thank you for the clarification. I just didn't want to assume anything and wasn't sure if there were other issues or not. I appreciate the kind words, but most of the original work came from Bob Marion... I just cleaned it up a bit for RavenNuke(tm). I hope to continue improving upon it now go forward.

Regarding this:

Quote:

Meaning the Downloads title image is set for .gif files.


I am still needing to drill into this statement more. The image link and image file that I provide is a PNG. It is:

modules/Downloads/images/logo.png

Therefore, if you have a logo.png in your theme package, it will pick it up and use that instead. What I am thinking I need to do is maybe rename that image to be down-logo.png? If I do this, it will still be a PNG and it should not conflict with any other logo.png file that is more site generic?

Am I still missing something here?

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Mon Jul 11, 2011 12:05 pm Reply with quote

Think in historical terms. Currently, themes look for (by default)

modules/Downloads/images/down-logo.GIF

To override this, a designer can:

Create a .GIF image (that matches their theme) and drop it into ... themes/images/down-logo.GIF and it will work.

NOW, when that is changed to .PNG it will destroy the order of things as they are now.

ALL older themes will ONLY look for the default ... modules/Downloads/images/down-logo.PNG image. AND, show no image at all. Because they are all .GIF images.

Thus creating a huge problem and a ton of questions all across the community as to why all of the nicely made themes/image/down-logo.GIF files don't work anymore.

NOW, if you coded it to look for either themes/images/down-logo.GIF or.PNG it won't change anything.

AND, the same for modules/Downloads/image/down-logo.GIF or .PNG.

It, in essence, will make your mod even better.




:edited for better clarity.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon Jul 11, 2011 9:19 pm Reply with quote

Ok. Complete clarity there. Thank you for that and sorry to be such a pain. The history lesson was good as well given I've never really focused much on specific theme support... sorry, just hasn't been a priority, but I need to change that - and will.

What I think is best is to move in the direction of having the download logo configurable at least. That will have to come with version 1.2.0.

In the interim, what I would say as the initial "stop-gap" fix is to just change that one line of code in the nsngd_func.php to "down-logo.gif" if one wishes to use a gif there. That will only need to be done the 1.1.x branch until I can get 1.2.0 out the door.

Does this sound like a reasonable compromise?

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Mon Jul 11, 2011 9:32 pm Reply with quote

I think that's a good plan. Can you leave the transparent image that comes with Nuke in the package if I change the file extension from .GIF to .PNG ? Then it will show automatically as down-logo.png . The blue one that is default (now) with the new download mod is (well ...) Smile
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon Jul 11, 2011 10:12 pm Reply with quote

That image came from Bob's original NSN Group Downloads which was the basis for this 1.1.0 release. I really do want to differentiate away from the original PHP-Nuke Downloads module... this needs to be a much better image.

Tell you what. If you wish to create a new down-logo.gif and/or down-logo.png image for this package, I will gladly modify the code for a 1.1.1 patch release, include the image and credit you for the new image in the credits. But, I think the stipulation needs to be that its a far better improvement from what the original PHP-Nuke logo was and what I have just released... ok?

If you agree, you may send it to montego --AT-- montegoscripts ((dot)) com.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
papamike
Newbie
Newbie



Joined: Jun 09, 2011
Posts: 22

PostPosted: Mon Jul 11, 2011 10:26 pm Reply with quote

If you use the image that comes packaged with Nuke/RavenNuke, then nothing will change ... except that it will be .PNG. The default download image there now is already recognized and it does match the Web Links one. I have had discussions with other theme designers who also wished that .png images were accepted, me being one, due to clarity.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Jul 12, 2011 8:26 am Reply with quote

I think you have missed my point. I want to differentiate this newer and better Downloads package from the original Nuke/RavenNuke module. I am not even interested in matching with any other images. Having a newer and better image would help to accomplish that.

I am not a graphical guy. Not my forte. But, I could have just as easily converted that image... (I'm a linux guy as well by the way)

I'm going to have to give this more thought. I understand where you are coming from, but as a module developer, I also have my needs/desires...

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch