forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: imgr8 on July 14, 2010, 02:52:05 am

Title: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 02:52:05 am
I want to upgrade my gallery from CPG 1.4.26 to 1.5.6 and I was modifying the curve theme to match my current theme, but I cannot figure out how to fix these two things:

1. The number of pages of comments shows on the top of comments and at the bottom, which file do I modify to make it to display only at the bottom?
2. I changed the default icons that came with CPG with my own text ones (such as delete icon, comment approve, disapprove, edit etc.) but they look compressed as they are bigger in width than the current ones. Currently the function that fetches these icons is something like cpg_fetch_icon('delete'..) and it makes the size 18px, where do I modify that? I changed the navbar icons with no difficulty but these other icons are messing up the look.

Any help is appreciated  :)
Title: Re: Remove # of pages from comments section and change height of icons
Post by: onthepike on July 14, 2010, 02:54:47 am
Please first post a link to your gallery. Not only is it required for all support requests, it's also helpful in your case to identify potential issues.
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 03:50:51 am
My gallery is still running on 1.4.14 as I wanted to have the theme in place before I upgraded, so I am running 1.5.6 on localhost on my computer. Here's the link to my current gallery http://www.ranbirkapoor.net/gallery/index.php I took some screencaps of the issues though:

1. The icons in comment section

1.4.14
http://i29.tinypic.com/2hqwinc.jpg

1.5.6
http://i25.tinypic.com/34q2ybl.jpg

The icons in the category manager (Admin controls)

1.4.14
http://i30.tinypic.com/2lp55h.jpg

1.5.6
http://i26.tinypic.com/fda5ah.jpg

The icons in the Navbar do not get compressed in 1.5.6 though
http://i31.tinypic.com/6ef0gm.jpg

2. The top page # section that I want to remove from the comments section
http://i25.tinypic.com/34q2ybl.jpg
Title: Re: Remove # of pages from comments section and change height of icons
Post by: Jeff Bailey on July 14, 2010, 04:04:05 am
Please don't hotlink images Board rules / Forum policies: Add Attachments (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270617.html#msg270617)
I've attached them to my post.

We can't support outdated versions.
Upgrade immediately, You are vulnerable to attacks. http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upgrade
Until you have an upgraded site we can't really help you because you could be hacked at any moment and lose all your and our hard work.

It's hard to help with theme issues without a live site to view. If you use Firefox: firebug is a good program to use when editing themes.
Have a look at some of these Tools: http://documentation.coppermine-gallery.net/en/dev_tools.htm#dev_tools_web_development
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 04:10:36 am
oh sorry, how do I edit my post to remove the image links?? I do have firebug and I tried looking at the php code too but everything points to the function cpg_fetch_icon(..) and I can't dig that down any further. Anyways I will upgrade and come back for help  :)
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 05:28:54 am
Alright I upgraded the gallery :)
Title: Re: Remove # of pages from comments section and change height of icons
Post by: Jeff Bailey on July 14, 2010, 05:32:27 am
Please create a test Non-Admin user as you require a log in.
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 05:44:57 am
Done!
Title: Re: Remove # of pages from comments section and change height of icons
Post by: Joachim Müller on July 14, 2010, 07:18:54 am
Currently the function that fetches these icons is something like cpg_fetch_icon('delete'..) and it makes the size 18px, where do I modify that?
Inside that very function definition. Edit include/functions.inc.php, find function cpg_fetch_icon and edit as you see fit. You'd be surprised what you can find using your operating system's built-in search function btw.
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 05:49:58 pm
I did try searching for it but it only showed me doc file for plugin hooks. Thanks, I will check there  :)
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 08:38:34 pm
Ok I fixed it by removing the width, height assignment from the function. Thanks a lot!
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 14, 2010, 10:59:21 pm
BTW how do I fix the comment thing? I found the code section that displays it in the function theme_html_comments but if I comment it out, then both the top and the bottom display table disappear.
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 15, 2010, 12:57:10 am
Nevermind, figured that out too  :)
Title: Re: Remove # of pages from comments section and change height of icons
Post by: Joachim Müller on July 15, 2010, 07:25:34 am
Then post what you did for the benefit of others with similar issues - that's the point of a support forum.
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 15, 2010, 09:32:10 pm
Alright  :) I don't know if this is the correct way to do it but it works.

In include/themes.inc.php , find the function theme_html_comments

Inside it on line 3824 there is a line of code
Code: [Select]
//$html .= ($tabs = ob_get_clean()); comment it out and then scroll down to find html .= $tabs , its after the while-loop end on line 3928, replace it with $html .= ($tabs = ob_get_clean()); Thats it  :)
Title: Re: Remove # of pages from comments section and change height of icons
Post by: phill104 on July 15, 2010, 09:58:59 pm
Nope, that is not the correct way to do it. You should not edit include/themes.inc.php but instead copy that function from the sample theme.php into your custom theme.php and perform your edit there.
Title: Re: Remove # of pages from comments section and change height of icons
Post by: imgr8 on July 15, 2010, 11:02:33 pm
Ok, will copy the function and reverse the changes in the themes file  :)