"Last Additions" table "breaks out" from fixed width layout "Last Additions" table "breaks out" from fixed width layout
 

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

"Last Additions" table "breaks out" from fixed width layout

Started by uk_martin, January 02, 2011, 10:11:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

uk_martin

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

lurkalot

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. ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

uk_martin

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.

uk_martin

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.

uk_martin

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


Αndré

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.

uk_martin

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

Αndré

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

uk_martin

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


Αndré

Quote from: uk_martin on January 03, 2011, 01:24:41 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.

uk_martin

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

Αndré

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

Open include/functions.inc.php, find
$rowset = CPGPluginAPI::filter('thumb_caption', $rowset);
above, add
   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
$rowset = CPGPluginAPI::filter('thumb_caption_lastup', $rowset);

uk_martin

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

Αndré

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

uk_martin

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

I'll mark this one then as solved.

Martin