Search…

X3 Photo Gallery Support Forums

Search…
 
bhchen
Experienced
Topic Author
Posts: 34
Joined: 05 Oct 2006, 01:02

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

10 Sep 2011, 22:58

Artur wrote:If only this, then you can do it yourself. For example you can use "description" section of your page to display info about updates :wink:
BIG thanks, Philip:

Your solution is just perfect for me. Glad to know that I don't need to wait for this new functionality until the next release of Imagevue. :wink:


Best regards,
- Bing
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

11 Sep 2011, 05:14

This is cool!
firedev.com
 
 
grimurnet
Experienced
Posts: 360
Joined: 17 Dec 2010, 04:50

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

11 Sep 2011, 09:57

Hi Philip, you really are coming up with brilliant things for imagevue. Is there any chance on sharing the feature of recent uploads with the thumbnails the one you are using on your site?
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

12 Sep 2011, 09:35

Actually it's working strictly for my website (Picture grid size, thumbnails size, text, links, listeners, etc...), for other websites it need to be change half of the code... Maybe, when I'll have time then I try to make this easier for implement in other galleries.
Btw, the basic source files I got from kirupa.com forum, you can play with, if you want to. :wink:
 
grimurnet
Experienced
Posts: 360
Joined: 17 Dec 2010, 04:50

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

12 Sep 2011, 10:05

Do you add thumbnails manually or do you have a script that reads "last added photos"? Because that is what I'm wanting to accomplish :-)

Edit:
Or even more simpler, just text without thumbnails.
e.g.
uploaded:
12.09.11
10.09.11

and having it linkable, so when you click it, it will bring you to that album

It would be great if ImageVue could add this to upcoming releases, that the start screen will display last uploaded or updated photos, a grid layout. That would work automatically.
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

12 Sep 2011, 12:05

Everything is fully automatic.

Basicly I have 3 xml files: "NewPhotos.xml", "NewComments.xml", "NewRates.xml".
I've changed indexController.php file, so when I do some operations on files in admin panel (uploading files, mooving files, renaming files, deleting files, etc...) my xml files are always updated by script.

The xml's tree looks for example like this:
Code
<images>
    <image name="Pic1.jpg" path="/conjtent/gallery/" info="11.10.2011" id="1" />
    <image name="Pic2.jpg" path="/conjtent/gallery2/" info="20.10.2011" id="2" />
    <image name="Pic3.jpg" path="/conjtent/gallery3/" info="22.10.2011" id="3" />
</images>


When uploading photos, script automatically create next <image/> section in "NewPhotos.xml" file, with all informations about it (file name, path, info...)

If for example I move "Pic1.jpg", from folder "gallery" to "gallery2", then script in indexController.php, read my xml files and if found image with "path" same as old path (there, where picture is currently), then change "path" to new one (there where I moved "Pic1.jpg").

The same situation is with deleting images, if script found that deleted file informations is stored in my xml files, then automatically remove them.

Script also check if the folder where I currently upload photos is hidden, or protected by password, if so, this picture will not be saved in "NewPhotos.xml" file.

The thumbnails are "extracted" in flash module, just flash script merge path + "tn_" + image name and load them. :wink:

There you have more informations about script I use.
 
grimurnet
Experienced
Posts: 360
Joined: 17 Dec 2010, 04:50

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

12 Sep 2011, 12:19

Artur wrote:Everything is fully automatic.

Basicly I have 3 xml files: "NewPhotos.xml", "NewComments.xml", "NewRates.xml".
I've changed indexController.php file, so when I do some operations on files in admin panel (uploading files, mooving files, renaming files, deleting files, etc...) my xml files are always updated by script.

The xml's tree looks for example like this:
Code
<images>
    <image name="Pic1.jpg" path="/conjtent/gallery/" info="11.10.2011" id="1" />
    <image name="Pic2.jpg" path="/conjtent/gallery2/" info="20.10.2011" id="2" />
    <image name="Pic3.jpg" path="/conjtent/gallery3/" info="22.10.2011" id="3" />
</images>


When uploading photos, script automatically create next <image/> section in "NewPhotos.xml" file, with all informations about it (file name, path, info...)

If for example I move "Pic1.jpg", from folder "gallery" to "gallery2", then script in indexController.php, read my xml files and if found image with "path" same as old path (there, where picture is currently), then change "path" to new one (there where I moved "Pic1.jpg").

The same situation is with deleting images, if script found that deleted file informations is stored in my xml files, then automatically remove them.

Script also check if the folder where I currently upload photos is hidden, or protected by password, if so, this picture will not be saved in "NewPhotos.xml" file.

The thumbnails are "extracted" in flash module, just flash script merge path + "tn_" + image name and load them. :wink:

There you have more informations about script I use.
This is a lot to at least try to play with. Thanks for this, If I may ask is there any code that needs to be used in a flash document or is this all put into IndexController.php?
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

12 Sep 2011, 12:57

grimurnet wrote: If I may ask is there any code that needs to be used in a flash document or is this all put into IndexController.php?
It's depends on what you want to have in flash (thumbnails, text, or both of them).
You need some function for load xml file, to grab data from it and push to objects that flash can display them.

The example xml loader for thumbnails with info (if you keep same xml structure as I wrote in previous post):
Code
Your_XML_Loader.onLoad=function() {
	var pictures=this.firstChild.childNodes;
	_global.total=pictures.length;
	pictures.reverse();
	for(i=0; i<total; i++) {
		var xmlObject=new Object()
		xmlObject.info=pictures[i].attributes.info
		xmlObject.path=pictures[i].attributes.path
		xmlObject.name=pictures[i].attributes.name
		xmlObject.thumbnail=pictures[i].attributes.path+"tn_"+pictures[i].attributes.name
		imagesData.push(xmlObject)
	}
}
Then you can play with.

Of course there is much more to do in flash for display what you need if you will try to make it from begin, but it's difficult to explain everything.
Better just download source files which I post previously (from kupina.com) and try to play with. First of all, change xml loader function, for compatible with your xml structure. Should looks like this:
Code
function loadXML(loaded) {
	if (loaded) {
		xmlNode = this.firstChild;
		image = [];
		description = [];
		thumbnails = [];
		url = [];
		_global.total = xmlNode.childNodes.length;
		for (i=0; i<total; i++) {
			image[i] = xmlNode.childNodes[i].attributes.path;
			description[i] = xmlNode.childNodes[i].attributes.info;
			thumbnails[i] = xmlNode.childNodes[i].attributes.path + "tn_" + xmlNode.childNodes[i].attributes.image;
			url[i] = xmlNode.childNodes[i].attributes.path + xmlNode.childNodes[i].attributes.image;
			thumbnailer(i);
		}
		firstImage();
	} else {
		trace("file not loaded!");
	}
}
then if you want make thumbnails clickable (get image url), you need add in onRelease section:
Code
getURL (url[k], "_self");
 
bhchen
Experienced
Topic Author
Posts: 34
Joined: 05 Oct 2006, 01:02

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

13 Sep 2011, 22:27

Artur wrote:If only this, then you can do it yourself. For example you can use "description" section of your page to display info about updates :wink:

Open file IndexController.php, which you can find in iv-admin/controllers/ and find line:
Code
$folder->addFile($file);
echo "File {$imageName} uploaded";
right after this line add following:
Code
$updated = date("d.m.Y"); 						
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->load("../last_update_module.xml");
$updateInfo = $dom->documentElement;
$updateInfo->setAttribute('update', "$updated");
$dom->save("../last_update_module.xml");
Save file.

Download attached file and unzip in root of your site.
Go to your admin panel->Manage, and open page in which you want to have "Last Updated on XX.XX.XXXX", then in "description" section add folowing:
Code
<img src="update_module.swf" height="30" width="400" />
Save page.

In last_update_module.xml file (which you put in root of your site) you can change module properties, like font size, font type, font colour, X-offset, Y-offset, and first text which apears right before update date.

If you have any questions, ask :wink:

File:
Last_updated_module.zip
Dear Artur:

Just found out that my implementation of this method didn't completely work - in that the "Last updated on ..." message was correctly shown on my chosen folder's description, but the date always stayed with the original date and did not update when contents of that folder were changed. Could it be anything I might have missed here? Thanks for your help again. :D
- Bing
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: Adding "Last updated on xxxx.xx.xx" on the welcome page.

14 Sep 2011, 00:03

I assume, for uploading photos you use uploader in admin panel instead of ftp.
Try to clear browser cache, if not help then look into last_update_module.xml file, and check what date you have there.
bhchen wrote: when contents of that folder were changed
You should see updated date wherever you upload a new photo, not only to this folder. And this works only for uploadings. If you delete photo, move to other folder, or do other changes in folder, then it will not update the date.