Remove # of pages from comments section and change height of icons Remove # of pages from comments section and change height of icons
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Remove # of pages from comments section and change height of icons

Started by imgr8, July 14, 2010, 02:52:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

imgr8

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  :)

onthepike

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.

imgr8

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

Jeff Bailey

Please don't hotlink images Board rules / Forum policies: Add Attachments
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
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

imgr8

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  :)

imgr8


Jeff Bailey

Please create a test Non-Admin user as you require a log in.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford


Joachim Müller

Quote from: imgr8 on July 14, 2010, 02:52:05 AMCurrently 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.

imgr8

I did try searching for it but it only showed me doc file for plugin hooks. Thanks, I will check there  :)

imgr8

Ok I fixed it by removing the width, height assignment from the function. Thanks a lot!

imgr8

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.

imgr8


Joachim Müller

Then post what you did for the benefit of others with similar issues - that's the point of a support forum.

imgr8

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 //$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  :)

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

imgr8

Ok, will copy the function and reverse the changes in the themes file  :)