Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 ... 11 12 13 14 [15] 16 17 18 19 ... 25   Go Down

Author Topic: EnlargeIt! (AJAX user interface for CPG 1.4.x)  (Read 377309 times)

0 Members and 1 Guest are viewing this topic.

makatron

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #280 on: December 21, 2008, 09:07:04 am »

the thing is that my website is a nightlife picture kind of site so i want the ppl being able to download their images
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #281 on: December 22, 2008, 05:04:34 pm »

I can't remember announcing EnlargeIt! as 'the plugin where people can download your pictures', nor as 'the plugin where noone can download your pictures'. In fact, the plugin does nothing at all to avoid or realize that.

If you want to make sure that everyone can download your pictures, write yourself an AJAX snippet for that purpose (there's already a few of them in folder toGalleryRoot). Shouldn't be too difficult, use the BBCode one as base for your own implementation and don't forget to contribute your code here.

If you want to make sure that noone can download your pictures, simply do not up them on the web.

If EnlargeIt! doesn't do what you need, uninstall it or improve it and contribute.
Logged

makatron

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #282 on: December 22, 2008, 06:39:20 pm »

the funny thing is that i was reading the code to write a snippet to add a download button

ill post something here when im done

once again timo, the plugin is so friggin awesome!!

hey where can i mod the code so i can pre-load 2 or 3 next pictures instead just the next one?
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #283 on: December 23, 2008, 01:02:14 am »

where can i mod the code so i can pre-load 2 or 3 next pictures instead just the next one?

Get latest version of enlargeit_source.js here.

Find this function:
Code: [Select]
function enl_makedraggable(enl_imgid)
The code that pre-loads the previous and the next pic is this one:
Code: [Select]
  if (enl_preload)
  {
    for(var enl_i=0; enl_i<2; enl_i++)
    {
      enl_nextpic = enl_getnext(enl_imgid,enl_i);
      if (enl_nextpic)
      {
        enl_pictoget = enl_nextpic.getAttribute('longdesc');
        setTimeout('enl_preloadit("'+enl_pictoget+'")' ,30);
      }
    }
  }

Don't misunderstand the loop. This code calls a function named enl_getnext that takes two parameters: The id of the current pic, and a flag. If the flag is 0, it will check for a previous pic. If the flag is 1, it will check for a next pic.

You could use some kind of iteration to make it preload the next 2 and the previous 2 pictures. Replace the above code with this:

Code: [Select]
  if (enl_preload)
  {
    for(var enl_i=0; enl_i<2; enl_i++)
    {
      enl_nextpic = enl_getnext(enl_imgid,enl_i);
      if (enl_nextpic)
      {
        for(var enl_j=0; enl_j<2; enl_j++)
        {
          enl_morenextpic = enl_getnext(enl_nextpic.id,enl_j);
          if (enl_morenextpic)
          {
            enl_pictoget = enl_morenextpic.getAttribute('longdesc');
            setTimeout('enl_preloadit("'+enl_pictoget+'")' ,30);
          }
        }
        enl_pictoget = enl_nextpic.getAttribute('longdesc');
        setTimeout('enl_preloadit("'+enl_pictoget+'")' ,30);
      }
    }
  }

Then use this packer to generate enlargeit.js out of your modified enlargeit_source.js.

The result: Two pics in each direction are preloaded automatically. Hope this helps a bit.

Probably I'll include real iteration somewhen.

regards
Timo

Edit: Typo.
« Last Edit: December 23, 2008, 01:11:26 am by Timos-Welt »
Logged

georgeandjacks

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #284 on: December 24, 2008, 08:28:14 am »

Hello,

I was wondering which file I have to edit to alter what's displayed in the title bar (where the info buttons and image title is) when an image is zoomed in.

I am trying to add Stramms shopping cart menu into it but am not sure whether it will work or not and wanted to try it out.

Thanks in advanced.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #285 on: December 24, 2008, 03:27:39 pm »

Hello,

I was wondering which file I have to edit to alter what's displayed in the title bar (where the info buttons and image title is) when an image is zoomed in.

I am trying to add Stramms shopping cart menu into it but am not sure whether it will work or not and wanted to try it out.

Thanks in advanced.

First try to understand how EnlargeIt! (the Javascript) works. Then have a look how the plugin uses it.

Read this, especially the chapter about buttons in general and AJAX buttons. Afterwards, have a look at codebase.php and understand how the buttons are realized. Shouldn't be too hard.

regards
Timo
Logged

georgeandjacks

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #286 on: December 25, 2008, 12:04:01 am »

Thanks for your quick and helpful response.

I will post again if I run into issues or if it works.

Thanks again.
Logged

Scope

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #287 on: December 28, 2008, 09:26:16 am »

How do you resize the window if you want to display youtube videos? 

Im linking in to a HD video I have uploaded but it will only display half the size compared to when I view it directly through youtube.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #288 on: December 28, 2008, 11:31:47 am »

How do you resize the window if you want to display youtube videos? 

You can't. The video size will be identical for all YouTube videos. It is defined in codebase.php, you can change it there globally. Find this line and have a look at its end (480/385):

Code: [Select]
else if ($enl_filetyplower == 'ytb' ) $neu_str .= '"><img '.$enl_pluscursor.'src="'.$match[2].$CONFIG['thumb_pfx'].$match[3].'" longdesc="swf::'.str_replace(".jpg","",str_replace("youtube_","http://www.youtube.com/v/",$CURRENT_PIC_DATA['filename'])).'&amp;fs=1&amp;rel=0::480::385';
regards
Timo
Logged

Shane

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 76
  • Choose Again
    • The Philmont Forum
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #289 on: January 19, 2009, 02:12:09 am »

Timo, I have a quick question.

Is there any way to have enlargeit show the photo description when you mouse over the "open" or "enlarged" photo?  Load the photo's description in a alt tag?

Thanks!
Shane
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #290 on: January 19, 2009, 08:10:24 am »

Internet Explorer often 'forgets' tool tips on the screen, showing them although the picture is already gone, which leads to a significant drop in animation performance on slower computers. Precondition for a fluent animation is the absence of any kind of browser generated tool tips. Only solution would be to write a function to generate own little boxes on screen that look like tool tips but that are controlled by the javascript and not by the browser, but that's big effort for small benefit, so I probably won't do it. Feel free to add such a functionality to the EnlargeIt! javascript if you like.
Logged

rms26

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #291 on: January 20, 2009, 10:50:27 am »

hi, great job !! I really like your plug, simply a little question, is there any way to use enlageIT! only on certain pages/ Album ? ( ex : just on index and one specific album )
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #292 on: January 20, 2009, 12:46:39 pm »

Open codebase.php with a text editor.

Find this line:
Code: [Select]
$html = str_replace($match[0],$neu_str,$html);
This is the actual replacement of the thumbnail code; you can add conditions here.

An example - replace the line by this:
Code: [Select]
if ((strpos($REQUEST_URI,"index")==true) || ($CURRENT_PIC_DATA['aid'] == 1))
{
  $html = str_replace($match[0],$neu_str,$html);
}

EnlargeIt! will only be active now if the string "index" is found in the URL, or if the pic's album ID is 1. This solution may not be exactly what you're looking for, but you will surely understand how it works and find out yourself what you want.

regards
Timo
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4696
    • Windsurf.me
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #293 on: January 20, 2009, 03:39:09 pm »

Is there any way to make the arrows jump to the next page of thumbs at the end of a page. Having to come out of EnlargeIt, click on the next tab then re-open EnlargIt seems a little clunky.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #294 on: January 21, 2009, 09:24:12 am »

I don't think that something like this can be realized with a plugin. The plugin doesn't know if there are more files; it changes the source code on a per-thumbnail-basis.
Logged

pixel

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #295 on: January 31, 2009, 03:01:00 am »

Hi guys. great plugin which ive been using for the last two days and all seems to run really smooth.
One thing i have noticed though, maybe its just me being thick but, i cant find anyway to delete an image from the gallery since using this plugin.

Also while this plugin is really fantastic, would it be possible to still use the ecard funtion, cant seem to get to it since using Enlargeit.

Thanks

Warm regards

Pixel
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4696
    • Windsurf.me
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #296 on: January 31, 2009, 10:15:15 am »

If you are in admin mode the standard interface should be available, unless you have configured Enlargit to operate in admin mode of course.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

pixel

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #297 on: January 31, 2009, 02:21:11 pm »

Thanks yes, ive found that i can delete a file using edit files in each individual album,so thats good. Just wondered about this ecard function, members do seem to like it, and i cant seem to get to it since using Enlargit

regards

Pixel
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #298 on: February 08, 2009, 10:50:47 pm »

Hi,

Just loving it :D

1 little question and 1 remark.

1) At http://www.ff.fm/fotoalbum/thumbnails-13.html I've got .flv-files.
OS = Fedora 10 (me)
Firefox : movies will play in either setting 'OS FLV' and 'rphMedia'
Opera : movies won't play in either setting

OS = Windows Vista (friend)
Firefox + MSIE

I thought maybe this (http://forum.coppermine-gallery.net/index.php/topic,34182.0.html) would interfere, but then the other browsers should have problems to?

Is this an error at my side with opera, or did I do something wrong with the plugin, or is it a (known?) bug?

2)
In Firefox the slider doesn't give the magnifier glass, but my normal pointer hand. Opera doesn't give the magnifier at all.

I edited ./plugins/slider/codebas.php and changed
Code: [Select]
.sliderimg { cursor: pointer; }to
Code: [Select]
.sliderimg { cursor: url(plugins/enlargeit/js/pluscur.cur), pointer; }
Opera doesn't support this style declaration at all.

Maybe you can add something like this to the readme of slider?


As said.
I love your plugins.

Thank you very much.
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: EnlargeIt! (AJAX user interface for CPG 1.4.x)
« Reply #299 on: February 09, 2009, 09:06:43 am »

I've found another 'problem'.

I'm jusing the Flickr like annotation from Nibbler (http://forum.coppermine-gallery.net/index.php/topic,41715.0.html).

Is it possible to have this layver put over the image which is shown by EnlargeIt!?
Or must I ask this question on the thread of that plugin?
Logged
Pages: 1 ... 11 12 13 14 [15] 16 17 18 19 ... 25   Go Up
 

Page created in 0.029 seconds with 20 queries.