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: "Last Additions" table "breaks out" from fixed width layout  (Read 8504 times)

0 Members and 1 Guest are viewing this topic.

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
"Last Additions" table "breaks out" from fixed width layout
« on: January 02, 2011, 10:11:41 pm »

Hi

I tried a dry run upgrade of my existing gallery to the latest 1.5 version, and then had a look to see if my theme would work in the latest version. Sadly the bottom table that contains the "Last Additions" has broken out of the confines of the fixed width layout. It works fine in the development site that I have been working on so far.

older development site - http://www.brummiesfans.com/coppermine
new development site - http://www.brummiesfans.com/photos/index.php?cat=23

Can someone please let me know how to fix this problem.

Thanks

Martin
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #1 on: January 03, 2011, 12:17:21 am »

Martin,

your first link.  Everything looks fine to me in IE8.  Nothing wrong when I scroll down to last additions.

Second link takes me to a login page only, and can't view the gallery. ;)
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #2 on: January 03, 2011, 08:40:19 am »

How about   http://www.brummiesfans.com/photos  - hope you can see the problem there, in the gallery, and I've just noticed that it's even worse in the Albums view (take a look at the PL Fours (Peterborough) album)

Looking at the problem with an "early morning" pair of eyes, I think that where the problem lies is that long text strings (e.g. in my case a URL in the credits) are shown in full. Is there a way for the URL's to be shortened? I think that would get over the problem as the text could then scroll and the tabular layout could stay within the design parameters.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #3 on: January 03, 2011, 08:45:37 am »

I forgot to mention, if you need it, try logging in with:

username & password = guest

The gallery is going to be bridged to phpBB and the user tables are those contained in there, so sorry about the need for the login.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #4 on: January 03, 2011, 08:54:15 am »

UPDATE - this gallery will be offline for a few mins as at 07.50hrs GMT to be upgraded to version 1.5.12

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #5 on: January 03, 2011, 10:11:51 am »

The main difference between both 'last additions' blocks is, that you display the title/description. I'm currently not sure if this is a mod made by you or if someone (me) has accidentally committed those change to the svn.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #6 on: January 03, 2011, 10:29:12 am »

In this gallery, I'm using a copy of my "live" database albums and categories tables, as well as a copy of the "live" files in the albums directory.

I haven't done anything to alter the coding of the "last additions" block. (I wouldn't know how to :) )

Interesting that in IE, the URL text string is displayed in full, whereas in Firefox, the URL is cut in half and shown over two rows of text. It's still long enough in Firefox to cause the cells to "swell" but not as bad as in IE. Still if it can be solved for IE, then it should be OK in FF too.

I've seen in places where URL's are shortened to a set number of characters. If that could be introduced here, I'm sure that the problem will be solved.

Thanks

Martin
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #7 on: January 03, 2011, 11:48:42 am »

I just downgraded to cpg1.5.6 and it seems that the title and description has always been displayed.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #8 on: January 03, 2011, 01:24:41 pm »

Can you tell if the problem is with the theme, or is it with the php?

Most important of all, can it be fixed?

I've gone back to www.brummiesfans.com/coppermine which is based on an older version too, and the problem is still there. (see attachments which show that the long text strings will expand the cell widths)

The question really is, what can be done about it? I really would like to see the cells retain their original widths and for the text inside to scroll normally, and for the URL's to be restricted to a certain number of visible characters (e.g. if "http://www.rerunproductions.co.uk/tracks_birmingham.html"  could be cut down to (as an example) "http://www.rerun...birmingham.html", or something like that, (with the hyperlink info remaining in tact) then I think that the problem that I have would be overcome. Would this be possible?

Thanks

Martin

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #9 on: January 03, 2011, 01:56:52 pm »

Can you tell if the problem is with the theme, or is it with the php?
I don't see a problem. Your content is simply too big to fit into the small cell. If you want to shorten long text, just say how your urls should be cutted and I'll try to come up with the appropriate code.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #10 on: January 03, 2011, 02:12:02 pm »

Thanks Andre

OK, if http://www.rerunproductions.co.uk/tracks_birmingham.html  could be cut down to just  rerunproductions then the problem will be overcome at its most basic level. If this could then be turned into a link to the original URL then that would be great.

OR

maybe it would be possible to detect a URL in the description text, and convert it to a "bit.ly" style short URL?

Whichever is easier for you.

Thanks

Martin
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #11 on: January 03, 2011, 03:20:12 pm »

The following instructions could be implemented as plugin very easily, but here's the quick & dirty mod.

Open include/functions.inc.php, find
Code: [Select]
$rowset = CPGPluginAPI::filter('thumb_caption', $rowset);above, add
Code: [Select]
   foreach($rowset as $key => $thumb) {
        $rowset[$key]['caption_text'] = preg_replace('/(<a.*>).*(<\/a>)/Usi', '\\1here\\2', make_clickable($thumb['caption_text']));
    }

So every link will be replaced with the clickable word 'here'.

I placed it inside the function build_caption, so it applies to every thumbnail caption. If you want it just for the lastup meta album, just move the code above
Code: [Select]
$rowset = CPGPluginAPI::filter('thumb_caption_lastup', $rowset);
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #12 on: January 03, 2011, 03:53:39 pm »

That's fantastic Andre

I'll keep it where it is, but would also like to add it to the function that governs the Gallery Index page too, so that where it happens there, can be overcome too (see attachement)

Thanks again

Martin
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #13 on: January 03, 2011, 04:19:12 pm »

You can do that manually by using the BBCode tag [ u r l ].
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: "Last Additions" table "breaks out" from fixed width layout
« Reply #14 on: January 03, 2011, 04:32:22 pm »

Andre, thanks for your help. It's been most useful.

I'll mark this one then as solved.

Martin
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.