31
gstarrett
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/9/30 5:11

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Quote:
I found out that you need to change $HTTP_GET_VARS to $HTTP_POST_VARS and it works properly again, with or without register_globals on. I've posted it as a bug to the core modules in the bug database.


FYI, XOOPS 2_0_5rc has this update included in it, and it posts comments correctly.

32
ffabris
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/4 22:21

  • ffabris

  • Just popping in

  • Posts: 16

  • Since: 2003/10/4


The fixes given by SirTanksAlot, along with others, helped me a great deal, though I still had to do some manual tweaking. For instance, I initially used all the files in the archive which SirTanksAlot provided, and that "killed" XoopsGallery entirely. So I went back and applied just those fixes which seemed to apply to problems I had, and that worked. Mostly.

I am left with one problem which I have been unable to solve, and that is the album description. I tried the fix suggested but that did nothing. I also tried using $album.description instead of $album.album_desc in xoopsgallery_index.html, but that didn't help either.

Not only does the description not appear, I can't even find where I might be able to change it. Looking at the code in view_album.php suggests that there should be link to edit the description on the gallery page, much like the one to edit the album title, but I get no such link.

I did discover that descriptions seem to be stored in the album.dat files, so I tried editing one of them (replaced the word "No" with "AA"), but that didn't help at all - not surprisingly, I guess.

Since my albums each contain art by individual artists, I very much want/need to use the description to display the artists' copyright notices, and this has had me stumped for hours already. Any pointers/suggestions would be appreciated!

Fab

P.S This is with XOOPS 2.0.5 RC, btw. And yes, I have been refreshing the module with every change I make.

33
gstarrett
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 0:36

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Quote:

ffabris wrote:
I am left with one problem which I have been unable to solve, and that is the album description. I tried the fix suggested but that did nothing. I also tried using $album.description instead of $album.album_desc in xoopsgallery_index.html, but that didn't help either.

Not only does the description not appear, I can't even find where I might be able to change it. Looking at the code in view_album.php suggests that there should be link to edit the description on the gallery page, much like the one to edit the album title, but I get no such link.


In my XoopsGallery, the descriptions seem to be working properly. You can set them on a main album from the default page and for a sub-album when looking at the entry in it's parent album via the admin drop-down list. The descriptions appear on the main page for top level albums and in normal text immediately after the name for sub-albums.

I have <{$album.album_desc}> for the smarty tag on the pages for the description.

I've also modified my XoopsGallery--looking at what you wrote, perhaps you were looking for the description to appear below the Album Name on View Album and View Photo pages (which would seem appropriate for copyright notices). You can do that by doing the following:

In both view_album.php and view_photo.php, find this one line:
$xoopsTpl->assign('album_title'$gallery->album->fields["title"]);

and copy it to 2 lines and change 2nd to description:
$xoopsTpl->assign('album_title'$gallery->album->fields["title"]);  
$xoopsTpl->assign('album_desc'$gallery->album->fields["description"]);


Then change the first 2 lines in \templates\xoopsgallery_viewalbum.html and \templates\xoopsgallery_viewphoto.html to:
<h4><{$album_title}></h4>  
<
p><{$album_desc}></p>


Hope this helps.

34
ffabris
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 0:53

  • ffabris

  • Just popping in

  • Posts: 16

  • Since: 2003/10/4


Thanks for the reply. It may help, but can we back up a bit please? First of all, where/how can a description be edited to start with? If I look at the list of albums on the gallery index, I see something like this (for each album):

Quote:
Fab[edit title]
Description
Owner ffabris
Administration [delete album][move album][rename album][edit captions][permissions]
Last Update 2003/10/2 4:39
Items 218
Views 67 (since 2003/10/2 1:01) [reset counter]

In other words, no link to edit the desc. I've looked all over, including the properties popup, permissions, on View Album...

This has been a problem from before I made any changes to the code, so I doubt it is something I introduced. (Oh, I've gone back to <{$album.album_desc}> since you said that works for you, but it doesn't for me.)

Thanks very much for the other suggestions you gave... I will try them out, but until I can actually put something in the description, there's not much point.

Fab

35
ffabris
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 1:26

  • ffabris

  • Just popping in

  • Posts: 16

  • Since: 2003/10/4


Btw, this is the relevant block in xoopsgallery_index.html:

Quote:
<{foreach item=album from=$albums}>
<table width=100% border=0 cellpadding=0 cellspacing=7>
<tr>
<td style="padding 10px;" width="<{$album.image.width}>" height="<{$album.image.height}>"><{$album.image.image}></a></td>
<td style="padding 10px;">
<div style="font-size: medium; font-weight: bold; padding: 5px;"><{$album.editlink}></div>
<table class="outer">
<tr>
<td class="head"><{$lang_description}></td>
<td class="even"><{$album.album_desc}></td>
</tr>
<tr>
<td class="head"><{$lang_owner}></td><td class="even"><a href="<{$xoops_url}>/userinfo.php?uid=<{$album.owner_id}>"><{$album.owner_name}></a></td>
</tr>
<{if $album.adminlink == true}>
<tr><td class="head"><{$lang_administration}></td><td class="even"><{$album.adminlink}></td></tr>
<{/if}>
<tr>
<td class="head"><{$lang_lastupdate}></td><td class="even"><{$album.last_modified}></td>
</tr>
<tr>
<td class="head"><{$lang_items}></td><td class="even"><{$album.num_photos}></td>
</tr>
<{if $album.num_views != ""}>
<tr>
<td class="head"><{$lang_views}></td><td class="even"><{$album.num_views}> (<{$album.num_views_since}>) <{$album.num_views_resetlink}></td>
</tr>
<{/if}>
<tr>
<td class="head"><{$lang_subalbums}></td><td class="even"><{$album.albumtree}></td>
</tr>
</table>
</td>
</tr>
</table>
<{/foreach}>

36
gstarrett
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 2:30

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Sorry about that--got a little carried away. You are looking at the right place, but apparently you don't have a [edit description] link just to the right of the description (or where it would go) on your page.

Relevant lines in albums.php:
Line 164:
  
$desc editField($gallery->album"description"$edit);

Line 200:
  
$xoopsTpl->append('albums', array('image' => $image'owner_id' => $owner->uid'owner_name' => $owner->username'editlink' => $editlink'album_desc' => $desc'adminlink' => $adminlink'last_modified' => formatTimestamp($gallery->album->getLastModificationTime(), 'm'), 'num_photos' => $gallery->album->numPhotos(0), 'num_views' => $num_views'num_views_since' => $num_views_since'num_views_resetlink' => $num_views_resetlink'albumtree' => $album_tree));


Relevant line in xoopsgallery_index.html:
Line 26:
  <
td class="head"><{$lang_description}></td>
  <
td class="even"><{$album.album_desc}></td>


Note that as I drill down into the editField function there are checks in there for "can update album text"--if you have been changing permissions in XoopsGallery, I suppose you could have removed your rights from there. If the files look OK then check into that side (I only know it exists, I've never messed with the album permissions really).

37
ffabris
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 15:32

  • ffabris

  • Just popping in

  • Posts: 16

  • Since: 2003/10/4


I really appreciate you taking time to help me with this - thanks!

Permissions... yes, I thought of that as well. So I just created a new album to test it. I set the title but nothing else. Still no link to edit the description.

Oh... classes/User.php has the canChangeTextOfAlbum function, which returns true for admins. Otherwise, I don't think I'd be able to edit album titles either.

As for the two lines you quoted from albums.php, that's hw mine look, so that's not it either.

I have this gut feeling that I am overlooking something painfully obvious and will kick myself for it once I find it. But in the meantime, this is driving me nuts.

38
ffabris
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 16:58

  • ffabris

  • Just popping in

  • Posts: 16

  • Since: 2003/10/4


OK, I decided to try debugging, and the results were quite interesting!
Notice [PHP]: Undefined propertyapp in file modules/xoopsgallery/config.php line 5
Notice 
[PHP]: Undefined indexshowOwners in file modules/xoopsgallery/config.php line 55
Notice 
[PHP]: Undefined indexHTTPS in file modules/xoopsgallery/init.php line 74
Notice 
[PHP]: Undefined variableGALLERY_NO_SESSIONS in file modules/xoopsgallery/init.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined variableimageDir in file modules/xoopsgallery/albums.php line 52
Notice 
[PHP]: Undefined indexxoops_lblocks in file class/smarty/Smarty.class.php line 626
Notice 
[PHP]: Undefined indexxoops_rblocks in file class/smarty/Smarty.class.php line 626
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined indexalbums in file class/smarty/Smarty.class.php line 626
Notice 
[PHP]: Undefined propertymirrorUrl in file modules/xoopsgallery/classes/Album.php line 749
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertymirrorUrl in file modules/xoopsgallery/classes/Album.php line 749
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertymirrorUrl in file modules/xoopsgallery/classes/Album.php line 749
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertymirrorUrl in file modules/xoopsgallery/classes/Album.php line 749
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertymirrorUrl in file modules/xoopsgallery/classes/Album.php line 749
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertymirrorUrl in file modules/xoopsgallery/classes/Album.php line 749
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined propertymirrorUrl in file modules/xoopsgallery/classes/Album.php line 749
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 163
Notice 
[PHP]: Undefined variableedit in file modules/xoopsgallery/albums.php line 164
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 107
Notice 
[PHP]: Undefined propertyuse_exif in file modules/xoopsgallery/classes/Album.php line 57
Notice 
[PHP]: Undefined propertyalbum_version in file modules/xoopsgallery/classes/Album.php line 77
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37
Notice 
[PHP]: Undefined indexdesc in file templates_c/db%3Axoopsgallery_index.html line 37


Note that I did update the xoopsgallery_index.html file, and I also deleted the cached template file at least twice, and updated the entire module as well for good measure. But nonetheless, it keeps reporting "Undefined index". So I am at a loss on that.

As for the other errors, I'll start checking into them later on. I need to do some more mundane things now... like have a bath.

Fab

39
ffabris
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 17:57

  • ffabris

  • Just popping in

  • Posts: 16

  • Since: 2003/10/4


OK, progress... of sorts: I edited the database table row for the xoopsgallery_index.html template directly, then deleted the cached template and... [drum roll, please] the descriptions now appear!

Now... to find how to edit them in some way besides modifying the album.dat file directly...

[added]
... and that's solved by refreshing my browser cache.

I saw you posted elsewhere that you're working on an updated version of this module. One thing you may want to look at is problems caused when giving marformed HTML code in a description. I did that in one just now: left out a closing ". The pop-up that appears when I try to edit the description now is all messed up. That's my fault, of course, but it would be nice if there was a check for it.
[/added]

40
gstarrett
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/10/5 20:47

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Quote:

ffabris wrote:
OK, progress... of sorts: I edited the database table row for the xoopsgallery_index.html template directly, then deleted the cached template and... [drum roll, please] the descriptions now appear!

Glad to hear it's working--doing an Update on the module should do the same thing, not sure why it didn't since I believe you said you were doing that. I have my XOOPS general preference "Update module template .html files..." set to "yes", not sure if that is the difference.

Quote:

I saw you posted elsewhere that you're working on an updated version of this module. One thing you may want to look at is problems caused when giving marformed HTML code in a description. I did that in one just now: left out a closing ". The pop-up that appears when I try to edit the description now is all messed up. That's my fault, of course, but it would be nice if there was a check for it.


Yes, making some progress but not sure if I'm going to go a *lot* deeper than what I needed to get mine running + other fixes others have submitted... there are a LOT of little glitches in there and I'm not sure if it would be worth the effort to iron them all out (especially since my time is so limited for tasks that require any concentration... it's very difficult to even carve this time out today). That said, I didn't even realize you could include HTML markup in the descriptions... the way to fix it would be to sanitize it and not allow HTML in there or change to XOOPS posting-style [] markup with appropriate cleansing (not sure how to do that yet either).

Guess what I'm saying is... if you want to keep the ability to have HTML markup in your descriptions, don't ask me to fix it because you might not like the fix (in this case ).

Login

Who's Online

178 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 178


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits