[Suggestion/request] photoalbum

Creating and modifying plugins.
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

I'm not one hundred percent sure, but I believe the arrows are being generated because the links are not explicit.... ie, the link has:

Code: Select all

<a href="?serendipity[subpage]=album&layer=1&gallery=test1">test1</a>
instead of

Code: Select all

<a href="http://www.sothq.net/?serendipity[subpage]=album&layer=1&gallery=test1">test1</a>
But that is a guess... to really figure out what is going on you should look at your css and find out where your offsite links style is coming from.

You also have some javascript stuck in your css, which will cause your css not to validate.
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

mgroeninger wrote:I'm not one hundred percent sure
Guess I was right about not being sure... Carl is right.
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

im using links as this

Code: Select all

<a href="?serendipity[subpage]=album&layer=1&gallery=test1">test1</a>
matts 1st example.

In the thumbnail page they show up as they should. and in the single image page they show with the arrow.

Ive checked the code and cannot see much difference. The difference what might cause this (div and classes) i tried changing but did not work.

I tried to avoid editing the theme..

{edit}
aha hmm i removed a <div> style from the templates. They look exact the same but the arrow is gone... ^^ Thanks carl for the tip on removing the 2 styles. I removed those two from the template instead
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Shrikee, about the SQL problem: Please try this query:

Code: Select all

$count_query = "SELECT count(id) AS counter FROM {$serendipity['dbPrefix']}images WHERE path = '".serendipity_db_escape_string($limit_directory)."'";
$count_result = serendipity_db_query($total_query, true, 'assoc');
print_r($count_result);
And tell me what the output is?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

In the current setup a filecount is hard to impossible, maybe in a later release.

mgroeninger did some great work on merging mediagallery with usergallery and improving some code i made. I've updated the template a bit and it seems we've got a working version now. If there wouldnt been a bug in s9y :( Ive posted in the bugs forum about it.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

HAhAA

Matt and I are happy to anounce a first release of usergallery with new functionality:
  • -new- Virtually unlimited galleries and sub-galleries
    -new- In theorie there is no limit to path depth.
    Unlimited images can be added to each gallery
    -new- Gallery pagination
    -new- Ingallery browsing to the next or previous image
    Several options for the admin to personalize the gallery
    Several types of usage including:
    • listed galleries (no sub-galleries)
      media library (with filter options)
      treeview (allows sub-galleries)
    Images are fullsized in a enhanced javascript popup
    Administration is fully done via the media manager build-in in serendipity
it took some days to put it all together. But here it is.
Matt is adding the file to the CVS. So there you can find it. Shortly i will offer it as download on my page aswell :
http://www.sothq.net/projects/usergallery.html
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

Incredible Plugin!!!

But I've found some bugs maybe its a failure on my webspace but maybe not.

As you can see on my testsite on the right sidebar there are two links named Gallerie and Gallerie2. Click on them and you'll see.

On the first link there comes the message:
Warning: Invalid argument supplied for foreach() in /srv/www/htdocs/web92/html/themes/plugins/serendipity_event_usergallery/serendipity_event_usergallery.php on line 375
and if I click on any image I'll be send back to the frontpage. In Gallerie2 with the directory listing the message won't be shown but if you click on an image a popup window opens (like it should ;-) ) but there's no image inside.

Thanks, Lordcoffee.
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

Im not sure if these are bugs. I didnt see them in my setup. I think matt hasnt either.

Make sure your php setup is not in safe mode and register_globals is switched on.

Also matt updated the plugin last night again with some template fixes. possibly its fixed already :)

success!
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

I've downloaded the newest version, but
Make sure your php setup is not in safe mode and register_globals is switched on
if these settings will fix the bug, I can't use the plugin. Of course I can but my provider will have some money for this. :-(

Are there no ways to use this without using these settings?
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

I suggest you try the new version first.

Im not sure if these settings will solve your problem but they allow certain modes of usage on a server. Similiar to using windows in safe mode or not. If a server is in safemode youre very limited in usage.

It *might* help. No guarantees!!

If you write to your host about it and explain the issue. Also explain that you are NOT experimenting with code and just need them to be changed for use of a professionally written script they will most likely help you out.

You could also mention that you are aware of the dangers of the settings but am not intending to use crappy scripts on the server. (especially register_globals can do serious damage if a script is written poorly)

If they charge you for the changes they are insane!

On my server i have no safe mode and register globals is on and i never had problems (even with buggy scripts).
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

shrikee, are you sure that register_globals needs to be set to ON?

I strongly discourage coding that relies on register_globals! Serendipity in fact relies on having it switched off. No plugin should require register_globals set to on...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

like i said, im not sure, think it doesnt require it to be on. I have it switched on on my server and there everything works.

Plus register_globals in itself is no danger if the scripter knows what hes doing.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Plus register_globals in itself is no danger if the scripter knows what hes doing.
:lol: This is not something I like to rely on, even when I wrote the code I am running... Too much can go wrong...

But, I can't think of anything in the plugin that would require register_globals... We read a string or two from $_GET, but we do no make the assumtion that they are variables already...

Plus, I run my server with register_globals set to off...

lordcoffee, would you mind describing when you get this error? Or letting me look at the URL?
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Ok, damn, I came into this conversation at the wrong place.... Sorry. Let me regroup my thoughts and come back in a minute....

:D
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

so to sum up:

The script works on a server with:
linux (my server)
windows (matts server)
register_globals on AND off

left then is the safe mode...
or just a glitch in the script.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
Post Reply