4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: mawenzi on March 07, 2008, 02:51:44 PM
-
I would like to use Tiltviewer http://www.airtightinteractive.com/projects/tiltviewer/ (http://www.airtightinteractive.com/projects/tiltviewer/) on my website, could you help me?
What is TiltViewer ?
TiltViewer is a free, customizable 3D Flash image viewing application.
- Click images to zoom-in, click again to zoom-out.
- Click the background to zoom-out.
- Click the 'reload' button (below the image grid) to load a new set of images.
- Click the 'flip' button (bottom-right of a zoomed-in image) to see image details.
More informations here : http://www.airtightinteractive.com/projects/tiltviewer/
How can I show images from my 4images website with TiltViewer on a extra site ?
A demo with TiltViewer and random images from my 4images-Mount-Kilimanjaro-Gallery : here (http://klick.kl.funpic.de/viewer.html)
And now the installations instruction ...
1. Step
Download TiltViewer v1.3 (http://www.airtightinteractive.com/projects/tiltviewer/tiltviewer.zip)
2. Step
Rename the index.html from the download package to viewer.html ...
Find in viewer.html in section // XML GALLERY OPTIONS ...
fo.addVariable("xmlURL", "gallery.xml");
and replace it with ...
fo.addVariable("xmlURL", "tiltviewer.php");
In viewer.html in section // GENERAL OPTIONS ...
You can change the design options of the viewer to your needs or to your 4images webdesign ...
3. Step
Create a new file "tiltviewer.php" with the following content ...
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: tiltviewer.php by mawenzi *
* File-Version: 1.0 - 26.02.2008 *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.x *
* *
* *
*************************************************************************/
define('GET_CACHES', 1);
define('ROOT_PATH', './');
define('GET_USER_ONLINE', 1);
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
//--------------------------------------------
//-- Random Images - TiltViewer --------------
//--------------------------------------------
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_date, i.image_active, i.image_media_file, c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
LIMIT 0,90";
$result = $site_db->query($sql);
echo "<tiltviewergallery>";
echo "<photos>";
while ($image_row = $site_db->fetch_array($result)){
echo "<photo imageurl=\"".ROOT_PATH."/data/media/".$image_row['cat_id']."/".$image_row['image_media_file']."\" linkurl=\"\">";
echo "<title>".$image_row['image_name']."</title>";
echo "<description>".$image_row['image_description']."</description>";
echo "</photo>";
} // end while
echo "</photos>";
echo "</tiltviewergallery>";
//----- End Random Images -------------------
?>
This "tiltviewer.php" presented "Random Images" from your 4images website ...
You can customise this file to your needs to show ...
- Random images from certain categories of your website
- All new images of your website
- New images from certain categories of your website
- a.s.o.
4. Step
Now upload the following files to your 4images root folder ...
- TiltViewer.swf
- swfobjects.js
- viewer.html
- tiltviewer.php
5. Step
Use the following link in your 4images templates to show your TiltViewer ...
<a href="http://www.Your_Website.com/viewer.html" target="_blank">Random Images with TiltViewer</a>
6. Step
Ready ... and have fun with TiltViewer ... :mrgreen: ... also in Full Screen ... 8O
-
Thank you!! :D
I have installed the mod but it doesn't work, I can't see any images http://www.webax.it/top.html.
If I try to open http://www.webax.it/tiltviewer.php I get this error
Notice: Undefined variable: additional_sql in /mounted-storage/home28b/sub001/sc24851-FNHZ/www/tiltviewer.php on line 25
An unexpected error occured. Please try again later.
Do I have to modify something in tiltviewer.php? And how to customize it?
-
Hi mawenzi, Nice work :wink:
But I get this error when I try to open the page viewer.html
An ActionScript error has occurred
TypeError: Error #1088: The markup in the document following the root element must be well-formed.
at data::XMLDataSource/::onGotXML()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
Do you have any Idea?
-
@ Alessio and cruxy
... I made some changes in tiltviewer.php ...
... please try the mod installation again ...
And how to customize it?
... e.g. here ...
ORDER BY RAND()
LIMIT 0,90";
to
ORDER BY i.image_date DESC
LIMIT 0,20";
for your 20 latest / newest images ...
-
@ Alessio
... perfect ... :wink:
-
Respect!!! :thumbup:
-
@ cruxy
... also perfect ... ;)
-
Einfach nur geil :wink:
-
@KurtW
... :mrgreen: ...
@all
... it seem that now the installation can made without any trouble ...
-
@ Alessio and cruxy
... I made some changes in tiltviewer.php ...
... please try the mod installation again ...
And how to customize it?
... e.g. here ...
ORDER BY RAND()
LIMIT 0,90";
to
ORDER BY i.image_date DESC
LIMIT 0,20";
for your 20 latest / newest images ...
You are the best! :D
-
@Alessio
... :oops: ...
-
Hello,
if I want to see all pictures of a certain categorie, how to customise the tiltviewer.php?
Thanks,
Rüdiger
-
Hi mawenzi - Just fantastic - Well done! :thumbup:
I'd like to implement a link "Back".
How and where can I do that?
Thanks!
TIMIT
-
Very good!
-
@Nordlicht2001
try this ...
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (1, 2)
ORDER BY RAND()";
... all images from categories 1 and 2 ... as random images ...
@TIMT
1. ... thanks ...
2.1 ... implement your back link in top of "viewer.html" ...
2.2 ... or use a page with back link in top and a Iframe with "viewer.html" as content ...
@Kai
... thanks ...
-
two more questions:
1. I have entered the home link after <body>. The problem is, that the picutres are not centered anymore and I get a "scrollbalken" on the rigth hand side.
2. Can I display the link to the detail view of an image after flip the picture in tiltviewer?
Thanks!
TIMIT
-
... for back link in detail view try this ...
... in tiltviewer.php find ...
linkurl=\"\"
... and add your back link url ...
linkurl=\"http://www.Your_website.com/index.php\"
... and in tiltviewer.html find ...
fo.addVariable("linkLabel", "View image info");
... and change to ...
fo.addVariable("linkLabel", "Back");
-
pictures aren't displayed anymore.
echo "<photo imageurl=\"".ROOT_PATH."/data/media/".$image_row['cat_id']."/".$image_row['image_media_file']."\" linkurl=\""http://www.Your_website.com/index.php\">";
-
... please read my post with the link code carefull ...
... you have to much " ...
... see how it works on my viewer.html ...
-
yes - your right - now I got back to my homepage.
but I would like to be directed to the detail page of the image (detail.html).
Is that possilbe?
-
Everything is possible :wink:
Try this:
linkurl=\"http://www.website.com/your galery/details.php?image_id=".$image_row['image_id']."\"
-
Everything is possible :wink:
... you are right ... :mrgreen:
-
Now Tiltviewer loads photos from cat 98 in order by date.
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY i.cat_id DESC
LIMIT 0,98";
How to loads images from a specified category randomly?
-
Hi Alessio,
Try this for categorie 1 (Change it to another categorie ID if you want):
WHERE i.image_active = 1 AND i.cat_id = '1' AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
";
Now Tiltviewer loads photos from cat 98 in order by date.
Is not correct!!!
0,98 is for your 98 latest / newest images :wink:
-
Hi Cruxy,
I have tried this code
WHERE i.image_active = 1 AND i.cat_id = '98' AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
";
but it doesn't work.
Thanks for your reply.
-
Hi Alessio,
This one should work:
WHERE i.image_active = 1 AND i.cat_id = 98 AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
";
-
Now it works, but it loads twice some images, why? :evil:
http://www.webax.it/top.html
-
Now it works, but it loads twice some images, why?
In the best photos category you have 66 pictures, right?
and for each page on the tiltviewer you have 25 pictures.
25 + 25 + 16 = 66
That means that tiltviewer needs more pictures to have 25 instead of 16. That why load some picture twice, but only in the last page. :wink:
I see that as a bug.
Any solution mawenzi??????
-
Hi Alessio,
I just have a look on you site en just realize that your pictures do not loads twise anymore.
Did you change something?
-
I haven't resolved the problem, temporanely I'm using this code:
WHERE i.image_active = 1 AND i.cat_id = 98 AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY BY i.cat_id DESC
";
-
Ok then. the problen is sure by (ORDER BY RAND())
-
Hey schaut Euch an, wie ich es auf meiner Seite gemacht habe!!!
http://www.profilfotografie.de/bilderband/index.php und dann in die Detailansicht, super mit Eurer Vorlage
Liebe Grüße aus Hamburg Jan
-
Wo, das ist ja ein nettes Spielzeug! :D
Danke dir!
Schön wäre es natürlich noch, wenn man es von jeder einzelnen Kategorie aus für dieselbige aufrufen könnte... :P
-
@RoadDogg
... und auch das lässt sich realisieren ... ;)
... werde das mal im ersten Post als Erweiterung hinzufügen ...
-
WOW!
Und eine Suchwortverknüpfung? wie: search.php?search_keywords=Nacht
:mrgreen:
P.S. Denke auch ans "Schlafengehen"... :D
-
I put some html tag in image description, like <a></a> coz i wanna link to another details.php. Then... TiltViewer can't loading the content.
Bugs?
-
@iPEI
... Bugs? ... please read the Using Instructions of TiltViewer ... here (http://www.airtightinteractive.com/projects/tiltviewer/docs.html) ...
5. description is the description text. To include HTML formatting you need to wrap your description in a CDATA tag like this:
<description><![CDATA[This is a HTML text description.
Supported tags are <b>bold</b>, <u>underline</u>,
<i>italics</i>, linebreaks<br>and
<font color="#ff0000" size="60">font tags</font>.
Hyperlinks are not supported.]]></description>
-
uupss... :oops: i miss that one.. thank you, guru :mrgreen:
-
Ok then. the problen is sure by (ORDER BY RAND())
Any solution?
-
Any solution?
... and what is your problem ... ?
-
Any solution?
... and what is your problem ... ?
Hi Mawenzy,
if I use the code
WHERE i.image_active = 1 AND i.cat_id = 98 AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
";
some images loads twice.
-
... you don't use "LIMIT" in the query ... ?
... the "LIMIT" must be a multiple of the image settings of TiltViewer in viewer.html (columns x rows) ...
... if no, I think this caused that some images loads twice ...
-
... you don't use "LIMIT" in the query ... ?
... the "LIMIT" must be a multiple of the image settings of TiltViewer in viewer.html (columns x rows) ...
... if no, I think this caused that some images loads twice ...
So the code could be
WHERE i.image_active = 1 AND i.cat_id = 98 AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
LIMIT 0, 36
";
but I don't understand what number I have to insert.
-
... in your case ... "LIMIT 0, 36" ...
- 0 : the randomly selected images starts with Nr. 1 ...
- 36 : max. randomly selected images ...
... the "LIMIT" must be a multiple of the image settings of TiltViewer in viewer.html (columns x rows) ...
- you want to show 2sites of TiltViewer ? so ... 36 : 2 = 18 ...
- you want to show 3rows in TiltViewer (settings in viewer.html) ? so ... 18 : 3 = 6 ... settings in viewer.html for columns must be 6 ...
so, now its time for your example in your TiltViewer ... ;)
-
I don't know if there's something wrong in my tiltviewer.php but images are still loading twice.
In "best photos" category I have 66 images, settings for viewer.html are 5rows and 5columns.
I have already tryed to put in LIMIT this numbers: 0, 66 - 0, 25 - 0, 75 - 0, 150.
-
... try this ...
- LIMIT 0, 60 ( limit must < or = for images in your category )
- rows : 5
- columns : 6
-
Perfect MOD
and its work smoothly :P
i have only one problem
when i load the picture to see the details, it does not support arabic language
http://www.143.ae/image/viewer.html
thanks for this MOD :D
-
@Mr_LovaLove
... did you try this in your viewer.html ... ?
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-
@mawenzi
Yes i did, and the arabic is :
<Meta Http-Equiv="Content-Type" Content="text/html; Charset=iso-8859-6">
but its not working
do i have to add the charset somewhere else ?
and thanks for ur support
-
Hallo,
@mawenzi
Fantastische Arbeit, hat auf anhieb funktioniert, echt super :thumbup: :thumbup: :thumbup:
Liebe Grüße,
Rewolve44
-
... try this ...
- LIMIT 0, 60 ( limit must < or = for images in your category )
- rows : 5
- columns : 6
It's too complicated, can you tell me how to display photos in descending order by date?
Thanx
-
Very Nice Mod! Gefällt mir mehr als gut :D
-
SuperArbeit! Vielen Dank für den Mod,@mawenzi ! :wink:
Ich bin ein totaler Newbie!
Ich würde gerne den Tiltviewer zur Ansicht meiner Kategorien nutzen.Ich habe den SlideshowII MOD for 4 version 1.3 von Deejay eingebaut.
Ich hätte den Ttiltviewer gerne genauso geöffnet, wie die Slideshow(die slideshow würde dann natürlich weggefallen).
meine Galerie : http://kingboemmel.ki.funpic.de/4images/
Könnte mir vielleicht jemand weiterhelfen oder einen kleinen Tip geben ?
Gruß
Bömmel
-
Hallo,
schöner MOD! :wink:
Hat jemand eine Idee, wie ich den Viewer gleich von Beginn im Vollbild starte?
Also ohne dass der User erst mit rechtem Mausklick den Vollbild-Modus startet?
Danke und Gruß
André
-
Ja schickes Ding! Wie bekommt man es denn hin dass nur die Bilder der Katerogie angezeigt werden in der man sich befindet?
-
@Blackman5001
... soll dann der Viewer über einen Link von der Kategorie aus aufgerufen werden ... ?
-
Ja das wäre am Besten. :wink:
-
So the code could be
WHERE i.image_active = 1 AND i.cat_id = 98 AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
LIMIT 0, 36
";
1. I'm using the Media-Site MOD (with videos), but video-pictures won't be shown... :mrgreen:
So, I need to specify in "WHERE", which cat-ids I'd like to show. But HOW to say... cat 1,2,3,4???
I've found a solution (but I think it's not the best):
WHERE (i.cat_id = 3
OR i.cat_id = 23
OR i.cat_id = 19
) AND i.image_active = 1 AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
LIMIT 0, 90
";
2. Is it also possible, to show the Category-Name in the description?
I've already tried $cat_name, but the output is absolutly wrong.
3. I set the Limit to "0, 500"... is this bad? This seems a stupid
question, but for me I don't see any probs with this setting.
-
@ Blackman5001
... Lösungsvorschlag mit Code folgt ...
@ Schnick und Schnack
... zu 1. ... na ok ...
... zu 2. ... das sollte aber funktionieren ...
echo "<description>".$image_row['image_description']." - Kategorie : ".$image_row['cat_name']."</description>";
... zu 3. ... wenn es keine Probleme bereitet ... dann ist's doch ok ...
-
... zu 2. ... das sollte aber funktionieren ...
echo "<description>".$image_row['image_description']." - Kategorie : ".$image_row['cat_name']."</description>";
Leider nicht. DAS hatte ich eigentlich auch ausprobiert. Die Kategorien werden zwar angezeigt, sie entsprechen aber nicht den richtigen!
... zu 3. ... wenn es keine Probleme bereitet ... dann ist's doch ok ...
Na lädt das Skript dann im Hintergrund beispielsweise alle 500 Bilder (selbst wenn nur immer 12 pro Seite angezeigt werden)?
Das wäre ja immens und sicher nicht gut für den Server...
Update: Werden eigentlich auch die Fotos "gezählt", wenn sie über TiltViewer abgerufen werden?
-
:flag-de: Kann ich eigentlich 2 Tabellen kombinieren? Der Hintergrund ist nämlich der, dass ich bereits ne kleine MOD von bergblume (http://www.4homepages.de/forum/index.php?topic=25131.0) nutze, in der ALLE Video-Kategorien (in der Settings-Tabelle) aufgelistet werden. Und Videos gehen ja nicht mit dem Tiltviewer (d.h., ich muss jedes Mal für jede neue Videokategorie die php erneuern). Und statt nun jede Videokategorie einzeln jedes Mal manuell einzugeben, wäre es doch praktischer, wenn das Skript in die Settings-Table bei "cat_rand_pic" schaut, und alle dort aufgelisteten Kategorie-IDs NICHT nimmt. Ginge das zu realisieren?
:flag-en: Is it possible to combine 2 tables? I'm still using the tiny mod of bergblume (http://www.4homepages.de/forum/index.php?topic=25131.0), in which the Categories (I don't want to show in Tiltviewer) already are listened. They are stored in the Settings-Table. Tiltviewer cannot present videos, so every time, I or my users have opened a new videocategory, I have to modify the tiltviewer.php manually! It would be more easier (cause automatic) to take a look at "cat_rand_pic" in the settings, where all the cat-ids I don't like to present (e.g "1,3,5,7,5") are stored. Is there a way to realize it?
-
Hi!
... Kann ich eigentlich 2 Tabellen kombinieren? Der Hintergrund ist nämlich der, dass.wenn das Skript in die Settings-Table bei "cat_rand_pic" schaut, und alle dort aufgelisteten Kategorie-IDs NICHT nimmt. Ginge das zu realisieren?.....
mit einer sql query den inhalt von "cat_rand_pic" auslesen:
$sql = "SELECT setting_value as cat_rand_pic
FROM ".SETTINGS_TABLE."
WHERE setting_name = 'cat_rand_pic'";
$result = $site_db->query($sql);
$row = mysql_fetch_object($result);
$cat_in = $row->cat_rand_pic;
und die abfrage von:
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
auf
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").") AND i.cat_id NOT IN (".$cat_in.")
mfg Andi
-
Moiähn! Danke Andi, das war's. Perfekt.
Also keine direkte Verküpfung, sondern das Auslesen eines Feldes, das
in eine Variable packen, und DIESE dann in die eigentliche Tabelle einbinden.
Schönen Wochenstart noch!
Sebas
-
@ Blackman5001
... Lösungsvorschlag mit Code folgt ...
Gibt es schon etwas neues?
-
Working fine ! :lol: ! :D ! Thanks ! :wink:
-
@mawenzi
Yes i did, and the arabic is :
<Meta Http-Equiv="Content-Type" Content="text/html; Charset=iso-8859-6">
but its not working
do i have to add the charset somewhere else ?
and thanks for ur support
Also interested in the problem encoding
-
@Mewanzi
Very great mod man, i love it. Very cool. But im very bad at the customization. Basicailly all i want to do is display all images from home.html. If there are alot of pictures maybe like this, 10 images to be viewed on screen and then user can click arrow to go and view another 10 more, but in a nice and clean column, row grid.
Im so lost of how to do this, plz can u help me sir
-
@zakaria666
... from home.html ... for instance the newest images ... ?
... then try this : http://www.4homepages.de/forum/index.php?topic=20789.msg113200#msg113200
-
@mewanzi
I think that just may have done the trick, thank u so much man, u and all the administrator and helpers here are the best.
Mewanzi, when i did the tweaking i realized that most of the uploaded content were videos and then realized that the tilt viewer does not display videos. Is there any chance that this can be tweaked to accept video content??
Thanks again bro
-
@zakaria666
... I think ... no ...
... for that the tiltviewer script must accept video content ... and that was not my part ...
-
Hi,
i like use tiltviewer to show the 50 newest images but i need to exlude at least
one categorie but likely more then a single categorie.
My problem is that iam really bad with sql selects, can someone point howto do it?
EDIT:
Ich konnte mir selbst helfen, folgender Code Schnipsel zeigt die letzten 50 Bilder mit
Ausnahme der Kategorienummern in der Klammer nach dem "NOT IN"
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (4, 7, 9, 19, 34, 35)
ORDER BY i.image_date DESC
LIMIT 0,50";
Hat schon jemand von euch das Experiment gewagt, den Tiltviewer als Ersatz für die Detailansicht
zu benutzen?
Greetz Jens
-
Hi Mawenzi,
it's far beyond my php skills...how can I select only smaller images e.g. whose size is less than 1MB?
Thanks in advance,
A.
-
Here is my Version of Tiltviewer
[MOD] Tiltviewer v1.0 (http://www.4homepages.de/forum/index.php?topic=30347.new#new)