Advanced search  

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

Pages: [1]   Go Down

Author Topic: Remove # of pages from comments section and change height of icons  (Read 6571 times)

0 Members and 1 Guest are viewing this topic.

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21

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

onthepike

  • Guest
Re: Remove # of pages from comments section and change height of icons
« Reply #1 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.
Logged

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #2 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
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Remove # of pages from comments section and change height of icons
« Reply #3 on: July 14, 2010, 04:04:05 am »

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
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #4 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  :)
Logged

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #5 on: July 14, 2010, 05:28:54 am »

Alright I upgraded the gallery :)
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Remove # of pages from comments section and change height of icons
« Reply #6 on: July 14, 2010, 05:32:27 am »

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

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #7 on: July 14, 2010, 05:44:57 am »

Done!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Remove # of pages from comments section and change height of icons
« Reply #8 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.
Logged

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #9 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  :)
Logged

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #10 on: July 14, 2010, 08:38:34 pm »

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

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #11 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.
Logged

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #12 on: July 15, 2010, 12:57:10 am »

Nevermind, figured that out too  :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Remove # of pages from comments section and change height of icons
« Reply #13 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.
Logged

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #14 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  :)
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Remove # of pages from comments section and change height of icons
« Reply #15 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

imgr8

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Remove # of pages from comments section and change height of icons
« Reply #16 on: July 15, 2010, 11:02:33 pm »

Ok, will copy the function and reverse the changes in the themes file  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 19 queries.