close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Caption info

Thread began 3/02/2011 9:27 am by farnumfoto279323 | Last modified 3/03/2011 3:58 pm by Jason Byrnes | 2415 views | 9 replies |

farnumfoto279323

Caption info

I'm using the Grid+Lightbox Gallery. When I add a description I get <br/> in the copy any time I use a hard or soft return. How can I avoid this and still be able to properly lay out the text? Also, how can I get rid of the camera icon? I also noticed in the preview galleries that there is copy at the bottom of the larger expanded image, instead of just "Image 1 of 2". How can I apply that to my larger images? DO I need to add that text directly to the jpeg image itself? Thanks in advance.

Sign in to reply to this post

Jason ByrnesWebAssist

to fix the br tag issue,


edit the mediarss.php file, change:

php:
echo '<title>' . xmlencode($row['title']) . '</title><description>' . xmlencode(nl2br($row['description'])) . '</description><link></link>';
            echo '<media:title>' . xmlencode($row['title']) . '</media:title><media:description>' . xmlencode(nl2br($row['description'])) . '</media:description>';




to:

php:
echo '<title>' . xmlencode($row['title']) . '</title><description>' . xmlencode($row['description']) . '</description><link></link>';
            echo '<media:title>' . xmlencode($row['title']) . '</media:title><media:description>' . xmlencode($row['description']) . '</media:description>';




to remove the camera icon from the tooltip, edit the galleries/grid_lightbox/css/common.css file, change:

.pg-gl-tip .tip {
background-color: #fff;
padding: 7px;
background-image: url(../images/camera.png);
background-repeat: no-repeat;
background-position: 10px 10px;
}



to:

.pg-gl-tip .tip {
background-color: #fff;
padding: 7px;
//background-image: url(../images/camera.png);
background-repeat: no-repeat;
background-position: 10px 10px;
}





I have attached an updated copy of the js/slimbox.js file to correct the problem with the file name not showing in the lisghtbox.

Attached Files
slimbox.js.zip
Sign in to reply to this post

farnumfoto279323

br tag issue & removing camera icon

RE: br tag issue. I copy the code that you supplied, however, there was a problem with it. I thought I fixed the problem, but I still keep getting this error:

Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /hermes/web04/b185/as.douglasstephen/public_html/powergallery/mediarss.php on line 88


On line 88 I added a paren "(" before the $ - xmlencode$row['description']). After I did that there were no more "syntax error on line 88" messages, but I'm still getting the parse error when I try and preview the gallery. I'm also still seeing the camera even though I placed 2 forward slashes where you specified. Please advise. Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the mediarss.php file and a link where i can see the problem.

Sign in to reply to this post

farnumfoto279323

mediarss.php

Here's the link:
choosegallery.php

Here's the php file:
<?php
//make sure connections file exists
//--
$rssdir = getcwd();
chdir(dirname(__FILE__));
require('Connections/powergallery.php');
require('webassist/framework/library.php');
chdir($rssdir);
mysql_select_db($database_powergallery);
if(empty($no_xml_header)) header('Content-type: text/xml');

$gallery_id = (isset($_GET['gallery']) && is_numeric($_GET['gallery'])) ? intval($_GET['gallery']) : false;
$thumb_size = isset($_GET['thumb']) ? $_GET['thumb'] : '62c';
$full_size = isset($_GET['full']) ? $_GET['full'] : '782p';
$super_size = isset($_GET['super']) ? $_GET['super'] : false;
$url_prefix = '';

$absLink = dirname(__FILE__);
$assumedRoot = (empty($_GET['local'])?$virtualdir:"") . "/".(abs2rel($absLink,$site_root)). "/";
$assumedRoot = str_replace("//", "/", $assumedRoot);
$WAGLOBAL_Root_URL = ((isset($_SERVER['SERVER_PROTOCOL']) && strpos($_SERVER['SERVER_PROTOCOL'], 'HTTPS') !== false) ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] .( (isset($_SERVER['SERVER_PORT'])&& $_SERVER['SERVER_PORT'] != 80)?":".$_SERVER['SERVER_PORT']:"") . $assumedRoot;

//global settings
$wa_settings = array();
$result = mysql_query('SELECT * FROM wa_settings');
while($row = mysql_fetch_assoc($result)) {
$wa_settings[$row['name']] = $row['value'];
}

//get first gallery id if none specified
if(!$gallery_id) {
$gallery_id = mysql_result(mysql_query('
SELECT COALESCE(id, 0) AS id
FROM pg1_gallery
ORDER BY id ASC LIMIT 0, 1'), 0, 'id');
}

//get url prefix if not set to local
if(empty($_GET['local'])) {
$url_prefix = $WAGLOBAL_Root_URL;
}

//gallery prefix
$gallery_prefix = 'images/' . $gallery_id . '/';
$url_prefix .= $gallery_prefix;
$gallery_prefix = realpath(dirname(__FILE__)) . '/' . $gallery_prefix;

if(!function_exists('xmlencode')) {
function xmlencode($s) {
return htmlspecialchars($s);
}
}

$result_gallery = mysql_query('
SELECT *
FROM pg1_gallery
WHERE id = ' . $gallery_id);

if(mysql_num_rows($result_gallery) == 1) {
$row_gallery = mysql_fetch_assoc($result_gallery);

echo '<?xml version="1.0" encoding="utf-8" standalone="yes"?>';
echo '<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom">';
echo '<channel><title>' . xmlencode($row_gallery['title']) . '</title><link></link><description></description><generator>PowerGallery by WebAssist</generator>';

$result = mysql_query('
SELECT *
FROM pg1_gallery_images
WHERE gallery_id = ' . $gallery_id . "
ORDER BY display_order ASC");

if(mysql_num_rows($result) > 0) {
while($row = mysql_fetch_assoc($result)) {
//get image info
$thumb_file = $row['file_prefix'] . '_' . $thumb_size . '.' . $row['file_ext'];
$thumb_imagesize = @getimagesize($gallery_prefix . $thumb_file);

$full_file = $row['file_prefix'] . '_' . $full_size . '.' . $row['file_ext'];
$full_imagesize = @getimagesize($gallery_prefix . $full_file);

if(!empty($super_size)) {
$super_size_file = $row['file_prefix'] . '_' . $super_size . '.' . $row['file_ext'];
$super_size_imagesize = @getimagesize($gallery_prefix . $super_size_file);
}

//create item
echo '<item>';
echo '<title>' . xmlencode($row['title']) . '</title><description>' . xmlencode($row['description']) . '</description><link></link>';
echo '<media:title>' . xmlencode($row['title']) . '</media:title><media:description>' . xmlencode($row['description']) . '</media:description>';
echo '<media:thumbnail url="' . $url_prefix . $thumb_file . '" type="' . $thumb_imagesize['mime'] . '" ' . $thumb_imagesize[3] . ' />';
echo '<media:content url="' . $url_prefix . $full_file . '" type="' . $full_imagesize['mime'] . '" ' . $full_imagesize[3] . ' />';
if(!empty($super_size)) {
echo '<media:supersize url="' . $url_prefix . $super_size_file . '" type="' . $super_size_imagesize['mime'] . '" ' . $super_size_imagesize[3] . ' />';
}
echo '</item>';
}
}

echo '</channel>';å
echo '</rss>';
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

I dont see a problem with this code, it looks correct.

I would suspect that the edit is not being uploaded to the server properly by Dreamweaver, delete the file off the server then re upload.

Is it on the choose gallery file,that you are seeing the camera icon or the gallery itself?

can you post a link to the gallery please

Sign in to reply to this post

farnumfoto279323

Power Gallery

I deleted mediarss.php from the server and uploaded. Now it's working.
Here's the link to the gallery, still seeing the camera icon. Thanks for your help.

index.php?gallery=2&theme=dark

Sign in to reply to this post

Jason ByrnesWebAssist

when i view the css directly on your server:
common.css

the camera.png has not been commented in the css:
.pg-gl-tip .tip {
background-color: #fff;
padding: 7px;
background-image: url(../images/camera.png);
background-repeat: no-repeat;
background-position: 10px 10px;
}

your edits to the css are being uploaded to the server.

Sign in to reply to this post

farnumfoto279323

common.css

I had to delete the common.css file from the server and then upload it. Now the camera is gone.
Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...