CB Profile Gallery -paging does not display

15 years 4 months ago #80268 by dawnshepherd
CB Profile Gallery -paging does not display was created by dawnshepherd
Hi, I am running Joomla 1.5.7, with CB 1.2 RC3. I have Nant's gallery (1.1.0RC2++plug_cbprofilegallery) installed. I get photos to show up, but when there are more than the number specified per page, there is no navigation to link to subsequent photo displays. Enable paging is set to yes.

Also, I have the photos per page set to six. In my testing, I have set up two accounts. One where I am a regular member, and the other I am set as admin. When I loaded photos to the regular member page, it displays six thumbnails on the page, although there is no navigation to subsequent gallery pages. However when I loaded photos onto the admin profile page, it will only display 3 of 7 that I have loaded. It shows that the others are loaded, but it won't display the last 3 that should be on the page, and no navigation available to continue to other photo pages. Any clues? When is the next version of Nant's Gallery due out?

Here is the site where I am having the problem: InThisEconomy.org

Sorry if this was already posted somewhere, but I couldn't find anything about the solution in previous posts.

Post edited by: dawnshepherd, at: 2008/11/20 22:11

Post edited by: dawnshepherd, at: 2008/11/20 22:13

Post edited by: dawnshepherd, at: 2008/11/21 00:01

Please Log in to join the conversation.

15 years 4 months ago #81126 by dawnshepherd
Replied by dawnshepherd on topic Re:CB Profile Gallery -paging does not display
I have figured out why I was having pagination problems. Actually it was not the pagination but rather the image uploading.

I was uploaded an image, all indications were that it had uploaded ok, and the 'quota marks' tally went up for the gallery. This image should have gone to the second page of this gallery, as the first page was already full. But, there was no pagination links to allow me to link to the second page. I thought the problem was with the pagination display. But it turns out that the image had not really loaded to the gallery.

I had used an apostrophe in the image title. Once I took the apostrophe out of the image title, it loaded fine, to the second page of the gallery, and the pagination appeared.

Has anyone else had this problem? Is there a way to get around this with a setting somewhere, so that users won't lose their images into the void with no indication that there was a problem?

Please Log in to join the conversation.

15 years 1 month ago #90002 by jveler
Hey Dawn,

I too had this problem. It seems as though there are parts of the code in the gallery component where the user input is altered to work correctly when it is displayed. For instance, there is a filter for HTML and for JS.

But, when it is inserted into the database, it puts it in as it was entered. This can actually cause an SQL injection possibility. I solved the problem by adding the addslashes() php function in the 2 queries where the photo data was inserted into the database.

This occured in the following areas:

around line 446, I changed from:

[code:1]. "pgitemtitle='" . $pgitemtitle . "',"
. "pgitemdescription='" . $pgitemdescription . "',"
[/code:1]

to:

[code:1]. "pgitemtitle='" . addslashes(stripslashes($pgitemtitle)) . "',"
. "pgitemdescription='" . addslashes(stripslashes($pgitemdescription)) . "',"
[/code:1]

I used addslashes and stripslashes as it was the case that if I didn't, the title then had slash before the apostrophe (') in it. This might not be the best way to do it, but it's at least a potential fix for the bug in future releases and what seems to causing the bug in the first place.

The other occurence is in the update code around line 623.

With these changes, I can now add apostrophes into images.

Hope this is helpful,

Joe

Post edited by: jveler, at: 2009/02/26 19:27

Post edited by: jveler, at: 2009/02/26 19:27

Please Log in to join the conversation.

14 years 9 months ago #103418 by Iulian_gafiu
Replied by Iulian_gafiu on topic Re:CB Profile Gallery -paging does not display
hy dawnshepherd. what browser you use ? try to clean the cache from joomla administration and the temporaries files from your browser

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.211 seconds

Facebook Twitter LinkedIn