By Jan on Tuesday, 20 May 2014
Posted in General Issues
Likes 0
Views 879
Votes 0
Hi,
could you please tell me how to aromatically exclude for example the .jpg from the name of the image when using gallery? Right now, it does take whole name... for example rose.jpg - when I click or it and it opens in lightbox the name there is rose.jpg ... how can it be only rose?
Thanks a lot
Hello Jan,

Use this file and at line 62 you should see these codes,


$title = str_ireplace(array('.jpeg','.png'), '', $image->original);


Add anything you want into the array
·
Thursday, 22 May 2014 23:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jan,

Unfortunately in easy blog you can't remove the '.jpg' . But you can add image caption when you select the image of your choice and click customize as shown here in this screenshot http://screencast.com/t/h0LN5jcqk to "remove" the .jpg file format name the result would be shown here in this screenshot http://screencast.com/t/to0nfXDb. When you post the image, the caption name of the image will appear instead of "rose.jpg"

Regards
Kheng Wei
·
Tuesday, 20 May 2014 19:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Kheng,
Thanks a lot for your reply. Is this possible even when I use gallery?
Regards...
Jan
·
Tuesday, 20 May 2014 19:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jan,

Unfortunately if you are using gallery, EasyBlog will actually retrieve all items from the folder and display the title as it is
·
Tuesday, 20 May 2014 22:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Jan
·
Wednesday, 21 May 2014 03:56
·
0 Likes
·
0 Votes
·
0 Comments
·
We might try to work around this in the future
·
Wednesday, 21 May 2014 12:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks a lot Mark,
if there is a line of code which could remove the last 4 characters = .jpeg, please let me know
Regards
Jan
Jan
·
Wednesday, 21 May 2014 20:33
·
0 Likes
·
0 Votes
·
0 Comments
·
What you can try is to edit the file /components/com_easyblog/themes/default/blog.gallery.php and locate the codes below,


<a title="<?php echo $this->escape( $image->original );?>" class="gallery-thumb-item gallery-thumb-<?php echo $uid;?> thumb-link" href="<?php echo $baseURI . '/' . $image->original;?>" rel="gallery-thumb-<?php echo $uid;?>"><img src="<?php echo $baseURI . '/' . $image->thumbnail;?>" style="max-width:<?php echo $system->config->get( 'main_image_gallery_maxwidth' );?>px;" /></a>


Replace it with,


<?php
$title = str_ireplace('.jpeg', '', $image->original);
?>
<a title="<?php echo $this->escape($title);?>" class="gallery-thumb-item gallery-thumb-<?php echo $uid;?> thumb-link" href="<?php echo $baseURI . '/' . $image->original;?>" rel="gallery-thumb-<?php echo $uid;?>"><img src="<?php echo $baseURI . '/' . $image->thumbnail;?>" style="max-width:<?php echo $system->config->get( 'main_image_gallery_maxwidth' );?>px;" /></a>
·
Wednesday, 21 May 2014 23:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,
thanks a lot for trying to help me
Unfortunately the images are not loading, so I checked the url and it shows like this: http://demowebsite.xxx/http://demowebsite.xxx/images/gallery//foldername/image.jpg
So it looks like something happened with the URL path.
Thank you
Jan
·
Thursday, 22 May 2014 01:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you upload the file here please?
·
Thursday, 22 May 2014 03:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Sure, I also add the print screen of what does happened after changed the file.
You can see the thumbnails don't show and what it does say when clicked = in lightbox. (Everything was fine before the edit.
Thanks again
Jan
·
Thursday, 22 May 2014 05:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jan,

Can you try replace with the attached file? If the issue are still there, you can provide us your backend and FTP so we can have a better look on your issue here. Please advise.
·
Thursday, 22 May 2014 11:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik,
thanks a lot, it works
Could you just tell me how could I remove others... for example .png ?
Thank you for awesome support!
Jan
·
Thursday, 22 May 2014 14:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you very much
Jan
·
Friday, 23 May 2014 01:53
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Friday, 23 May 2014 03:19
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post