PDA

View Full Version : Addon: Related pictures


GeoS
02-20-2006, 01:54 AM
Name:
Related pictures

Desc:
This addon gives option of building related pictures list under image.
I.e. you were in zoo and shoot 3 pictures. Thanks to this addon you can "connect" each picture with the rest which is already published at your Pixelpost.

Live example you can find here http://blog.piotrgalas.com/photo/271/Too_fast_too_crazy/.

PS In all my "fresh" addons there is always Paypal button thanks to which you can donate process of creating next releases of it. The amount of money doesnt matter - the most important for me is to see its worth to sleep less, to read about new technologies, to search new solutions and think about new ideas.

It uses tag: <RELATED_IMG>

It works ONLY WITH Pixelpost 1.5 BETA1 or NEWER.

Addon page:
http://techblog.piotrgalas.com/pixelpost-addons/#related

Addon details:
Version: 54
Category: addon
Requires Pixelpost version - 1.5 BETA1

Download:
http://techblog.piotrgalas.com/pixelpost-addons/#related

Installation:
Just extract archive. After it go to addon page at admin side (at this moment there is SQL installation executed) and thats all. Have fun ;)

History 54:

erased "Related images" string from addon output
fixed SQL queries order in admin part to prevent errors after first install
option of showing thumbnail links intead of text links with overlib effect
version check for front part


History 49:

alternative language support
option of setting related images order
option for switching on/off overlib effect


History 27:

first here it is - new method of version numbering as I'm currently using SVN in my development process
fixed small bugs that was making problems with showing overlib and updated to new name of workspace used at admin panel
new URL with live example (http://www.delaviedesimagettes.net/index.php?showimage=89)


History 1.3.1:

Fixed bug which gived option to watch images queued for future
Now overlib effect is wider and thumbnails are centered


History 1.3:

Added configuration variable for overlib on front side - now you can decide if you want to use overlib on front or not.
Added configuration variable for Related Images list order - now you can choose between id, headline and datetime order (ascending or descending).
Added configuration variable thanks for which you can decide if you want make relation in both directions - picture a is related with picture b and reverse or only picture a is related with picture b.
All of this variables have predefined settings to start up without any problems.


History 1.2:

Added usage of overlib on front side to make preview of related images thumbnails.
Bugfix of the small problem of not displaying thumbnails with spaces in file names (admin_related.php).
Bugfix of the small problem with displaying RELATED IMAGES text for non existing related images (thx spipasucci).



History 1.1:

Bugfix of admin_related.php <FORM> path. Now it should save relations and all data without making it empty.

raminia
02-20-2006, 07:42 PM
could you give some example post?

GeoS
02-20-2006, 09:17 PM
Ill post here screenshoots in a minute.

For now here you got example post:
http://geos.wzzone.com/archive.php/263/Rain_drops/2006_02_09_02:06:54

EDIT: Now there are images:
http://geos.wzzone.com/projects/related-1.jpg
http://geos.wzzone.com/projects/related-2.jpg

spipasucci
02-21-2006, 05:37 AM
Trying this addon. It installs fine and I get the option menus to add related items to pics. When I try to update the post, I get a 404 error. Is there any additional info I need to put in my index.php file?

raminia
02-21-2006, 06:31 AM
very nice. I'll try it.

spipasucci
02-21-2006, 04:02 PM
Found that the path on clicking "Update Post" was incorrect (on my system). Upon pathing it correctly, it killed the image data for the updated image (deleting it's title and text as well as it's upload date - thus putting it first in the sequence)... Also, it never created a relation to another image...
You mention in the addon text something about a SQL initiation. Is this where I encountered a problem?

I've removed the addon for now...

Sounds like a great idea tho'...

GeoS
02-22-2006, 11:45 AM
OK. At today's evening Ill try to fix all stuff.

Initialization is by going to addon page in admin section after addon upload. Then is executed SQL commands creating tables in DB.

About editing image. I had same problem because one of workspace is in a little unfortunelty place. In update image section there is one opened <FORM> but with the same target at correct one so all data should be send to it.
Ill test it today one more time and try to solve this issue.

PS spipasucci - can you send me at which URL is your admin part and to what URL it was sending you after update (with 404 effect)?? It can be relative URL if you dont want to send me full paths.

EDIT: Now there is updated version. There was small bug :/

hicks0r
02-24-2006, 05:56 PM
OK. At today's evening Ill try to fix all stuff.

Initialization is by going to addon page in admin section after addon upload. Then is executed SQL commands creating tables in DB.

About editing image. I had same problem because one of workspace is in a little unfortunelty place. In update image section there is one opened <FORM> but with the same target at correct one so all data should be send to it.
Ill test it today one more time and try to solve this issue.

PS spipasucci - can you send me at which URL is your admin part and to what URL it was sending you after update (with 404 effect)?? It can be relative URL if you dont want to send me full paths.

EDIT: Now there is updated version. There was small bug :/

I'm having the same problems, when I update a image I was send to

.../admin/index.php?view=images&x=update&imageid=3

and I can read that

"rel_pic#3: You have an error in your SQL syntax near '; ' at line 1INSERT INTO pixelpost_related VALUES (3,2); "

GeoS
02-24-2006, 11:55 PM
1. What version of admin_related.php do you have?

2. Did you visit addons page at first (after uploading it on server)? This installs addon in Pixelpost's DB and is necessary.

GeoS
02-26-2006, 09:08 AM
Update (version 1.2) is available right now at:
http://pixelpost.org/v1/index.php?x=downloads&details=151

hicks0r
02-26-2006, 01:18 PM
1. What version of admin_related.php do you have?

2. Did you visit addons page at first (after uploading it on server)? This installs addon in Pixelpost's DB and is necessary.

I updated to your last version v1.2, I visit first addon section, I'm using 1.5b pixelpost with simple-visions template, I just uploaed the two files to addon directory, the includes to includes and the "related_image" folder to templates folder.

No tag added anywhere in my simple-visions template.

What's wrong ?

GeoS
02-26-2006, 10:31 PM
Attached template shows how it work (if you add some related image to one of your pics). You can test it by setting it as you default one.

Addon's description says quite clearly that you should add <RELATED_IMG> tag to your current image_template.html to get it work.

hicks0r
02-26-2006, 11:09 PM
Attached template shows how it work (if you add some related image to one of your pics). You can test it by setting it as you default one.

Addon's description says quite clearly that you should add <RELATED_IMG> tag to your current image_template.html to get it work.

Sorry If I didn't explain exactly, I installed the addon correctly but when I try to "ralate" some image and Update post or make new post I receive that error

rel_pic#3: You have an error in your SQL syntax near '; ' at line 1INSERT INTO pixelpost_related VALUES (2,1);

And I sended to /photoblog/admin/index.php?view=images&x=update&imageid=2

I use your last addon version and pixelpost 1.5b

hicks0r
02-26-2006, 11:22 PM
Last news .... I make it works on pp 1.5b

I remove the ; at line 96 );\ , I leave )\

$query = "INSERT INTO {$pixelpost_db_prefix}related VALUES ($theid,$v);\n";

But, ... I'm having problems traying to install that addon on "1.4.3 of Pixelpost."

I receive that line:

Fatal error: Call to undefined function: add_admin_functions() in /.../public_html/addons/admin_related.php on line 58

GeoS
02-27-2006, 12:45 AM
This addon is only for PP 1.5 and newer. Reason of it is that it uses workspaces in admin panel which are not available at lower versions.

PS IMHO such SQL code is OK (so I dont know why your server had problems):INSERT INTO pixelpost_related VALUES (2,1);

GeoS
02-27-2006, 10:15 PM
One more interesting update with fixed your (hicks0r) problem.

hicks0r
02-28-2006, 11:05 PM
One more interesting update with fixed your (hicks0r) problem.

Really thanks, the addon works Ok for me, can see it on http://www.ecomam.net

GeoS
04-30-2006, 12:18 AM
There was an update.

Please read addon changelog (history) on forum (http://forum.pixelpost.org/showpost.php?p=24586&postcount=1) or in addon section of pixelpost.org (http://pixelpost.org/v1/index.php?x=downloads&details=151).

GeoS
07-14-2006, 05:21 PM
UPDATE:

History 27:

at first here it is - new method of version numbering as I'm currently using SVN in my development process
fixed small bugs that was making problems with showing overlib and updated to new name of workspace used at admin panel
new URL with live example (http://www.delaviedesimagettes.net/index.php?showimage=89)

Marek
11-10-2006, 01:07 PM
Is it possible to expand the list of related image in the admin panel?
I mean this one where max of five pos. are listed and the admin have to select some.

thanks.

marek

GeoS
11-10-2006, 11:31 PM
Yes it is. Open /addons/admin_related.php and find (~line 77):
$output = "\n<script type='text/javascript' src='../includes/overlib.js'></script><div align='left' style='padding-left:10px;width:150px'>Related images:<select name='rel_pic[]' multiple size='5'>\n";
where this last size means how many things do you want to watch at once.

Marek
11-11-2006, 04:27 AM
Thanks GeoS,

I did a change for the width, too.

1000words
12-31-2006, 01:50 PM
Hi Geos

You have created a wonderful, wonderful add-on. It has enabled me to link submissions created by the one author. It works like a dream.

Regards
David

GeoS
01-01-2007, 11:20 PM
Thx.

As I've made some changes in my template then I need some new stuff for this addon. I can promise there will be next update.

sensen
01-04-2007, 09:29 AM
Hi,

is it possible to show more than 10 Hits?

Regards mike

GeoS
01-04-2007, 05:25 PM
Yes as there is no limitation for it ;)

cinnamommy
02-22-2007, 11:56 PM
Wonderful feature.

Nevermind my question.

GeoS
09-25-2007, 10:56 AM
There was update! Go to first post in topic to get more info.

GeoS
11-02-2007, 02:40 PM
PS In all my "fresh" addons there is always Paypal button thanks to which you can donate process of creating next releases of it. The amount of money doesnt matter - the most important for me is to see its worth to sleep less, to read about new technologies, to search new solutions and think about new ideas.

Juan
11-18-2007, 11:07 AM
He intentado poner este addons, pero no me funciona, no entiendo por que?

I tried to put this addons, but does not work for me, I do not understand why?

Franco
11-21-2007, 01:36 AM
Hi GeoS


Thanks for your wonderful addon!

I was wondering if you could point me in the right direction.

If there a way to relate to pictures which are NOT published?

Sometimes, I want to add related picture, but I don't necessarily want to publish them in my photoblog.

Any advice?

Thanks :)

Franco

austriaka
11-21-2007, 05:56 AM
How should that work? Why do you want to link to an image nobody can see? Do you speak of an external link? Or a thumbnail you created manually?

GeoS
11-23-2007, 06:47 PM
Hi,

Yes you can as at admin panel you should see all images without split on this published and hidden one.

At front side this "hidden" (future) images will be visible as related when will come their time :D

GeoS
11-23-2007, 06:51 PM
I tried to put this addons, but does not work for me, I do not understand why?

Hi,

Give me a link and some more infos what is not working.

Franco
11-26-2007, 03:13 AM
Thanks for your help and time!

I understand that you are saying that I should publish pictures for a future date, and that the "related to" link will appear when the photo is published, but what I mean is that I would like to relate to images that I will never publish.

I just want to had miscellaneous pictures of the same photoshoot, but whitout having to add them to the photoblog main page.

Is that more clear? :D

Thanks again!

austriaka
11-26-2007, 06:08 AM
With Related Images Addon you can relate only to images which are published in the photoblog.
But I understand what you mean.
I did something similar in my previous template, but it needed a hack in GeosShowCategory Addon.
Know that Pixelpost has a default category "All" which shows your Photoblog with all images, no matter of the category. So if there is no GET-part "category=NN" in the URL, all images in database will be shown in browse page and are reachable in image page.
To change this behaviour, you have to define a category named "all" in the Addons Panel and look out which category id this one has.
Set this category as dedicated default category in the beginning of GeosShowCategory Addon:
if (!$_GET['category'] || $_GET['category'] == '') $_GET['category']=='1';
(if it has cat id 1). This will force Pixelpost to use always a category. If none is selected, your "All" category is used.

Now when clicking a link for default "all" images (which has no category in the link) the page is displayed with "category=1" and all images which are in category "all" (id 1) should be shown.

Don't forget to select this category for all images-to-publish when you upload them (and do a mass category edit in the images list for those which are already uploaded).

Now you are done with what you wanted: you can upload your "main" images into whatever category you want AND into the "All" category. Your "related" images which you don't want to show when browsing the images or browse page receive no category at all.
You can use the Related Images Addon to link to the other images and you can even put the thumbnail-links into the image description (with HTML od Markdown) if you want.
example: http://blog.uhlig.at/index.php?showimage=845&popup=comment

GeoS
11-26-2007, 08:28 PM
In such situation I suggest you to use this:
http://www.pixelpost.org/forum/showthread.php?t=7196

Thanks to it you can link with anything and anywhere you want :D

Franco
11-28-2007, 05:48 AM
Hello Geos and Austrika!

Thanks alot for your sugestions.

GEOS I really like your addon for the Related Gallery! wow! But I have PixelPost 1.7 and its not working! :( Any suggestions?


I have not tried yet Austrika's solution, but it seems a little complicated. If i am unable to get Related Gallery working, I will give it a try.

Thank you for your kindness! both of you! :D

Franco

Franco
11-28-2007, 05:55 AM
oups... I should tell you what is not working if you are going to help :)

-I have uploaded both admin_galleries.php and galleries.php to my addon older.
-I see them in the Addon Admin panel, they are both activated.
-When I edit an image, I see the 3 fields.
Gallery link title
Gallery URL
Open link in new or same window...
-I am able to values and same them
- If i return to the image properties after, the values are still there, so thats a good sign :) (i guess that means it writing to database)


But when I place the tag <PGA_GALLERY_LINK> im my image_template.html file, and refresh, I see nothing.... :(

Any ideas?

GeoS
11-30-2007, 10:29 PM
Strange as Im using almost the newest version from our SVN repository and it is still working good.

Where I can see this issue in internet enviroment?

ibeepix
05-09-2008, 12:07 PM
hello,

is there a way to show a row of thumbnails of the related images in stead of the list of titles? Is there a different tag I could use instead of the <RELATED_IMG> tag? Or is there a different way to do it? I know it's possible, cause I've seen it done on a blog, unfortunately I haven't got that blog url any more...

thanks,
Ine

ibeepix
05-09-2008, 01:43 PM
I've found my solution here (http://www.pixelpost.org/forum/showthread.php?t=7134&highlight=related+images+thumbnails), thanks