Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-03-22 09:40:16

mouloud
Xinha Community Member
Registered: 2007-02-23
Posts: 12

Need some advice on module customizing

Hi there,
I just added a ticket about adding a popup option for image in the ExtendedFileManager
I suppose there is a lot of priority before that, so I want to try it myself.
May be somebody can show me wich files I'll have to modify to achieve that :
1. In the ExtendedFileManager popup
   1.1 add a checkbox
   1.2 add a field to indicate the large file
2. In the resulting code
   2.1 add a link on the img code : <a href="myPopupFile.php?file=path/to/the/larger/file" onclick="popup(this.href); return false;"><img src...></a>
   2.2 add a javascript somewhere at the top of the document, for the popup function. Maybe for the beggining I could add all the code in the onclick, but it would give a lighter code to have it in a generic function
3. Add in the configuration
   3.1 the path to the popup page

Just show me the files I'll have to edit for that, and maybe I well understand how it work alone. But there is a lot of files, and I don't want top open en read all to find how the code work.

Thanks. smile

Last edited by mouloud (2007-03-22 09:48:53)

Offline

#2 2007-03-26 05:30:15

mouloud
Xinha Community Member
Registered: 2007-02-23
Posts: 12

Re: Need some advice on module customizing

Anybody ? Just a lead ?

Offline

#3 2007-03-26 11:30:23

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Need some advice on module customizing

Short answer: the popup is plugins/ExtendedFileManager/manager.php, the code that inserts the image/link is to be found in plugins/ExtendedFileManager/extended-file-manager.js

If you have any further questions (and I'm sure you will smile ), ask and I will try to do my best to help

Offline

#4 2007-03-27 10:46:41

mouloud
Xinha Community Member
Registered: 2007-02-23
Posts: 12

Re: Need some advice on module customizing

thanks a lot.
And you win, i have a further question wink
Where is the function that change the size of the ExtendedFileManager popup ?
Now i have added a row, the window size is to small.

Offline

#5 2007-03-27 16:20:17

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Need some advice on module customizing

plugins/ExtendedFileManager/assets/manager.js around l. 50

There's a variable called offsetForInputs that's does the job

Offline

#6 2007-03-28 03:33:31

mouloud
Xinha Community Member
Registered: 2007-02-23
Posts: 12

Re: Need some advice on module customizing

Ok, thanks, it works...

But now I'm trying to dive into extended-file-manager.js, and you want the true ? I don't understand a bit. I was thinking I was good at javascript, but the ways you dudes do javascript is a higher level. I suppose it's the full object-oriented that confuse me a bit... And the non-indented code, the shorts variables...
May be you can explain me the principle of how it works...
Or may be there is somewhere a comented version of this file ?

Offline

#7 2007-03-28 04:35:47

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Need some advice on module customizing

Sounds like you are working on the compressed file, that's of course a tough job wink

You should check out the svn repository ( http://svn.xinha.python-hosting.com/trunk/ ) or download the nightly from the downloads page to get the indented code with the real variable names. It's not not well commented though, but if you once have understood how it works, it's not overly complicated

Offline

Board footer

Powered by FluxBB