Module: preformatted URLs (attachment + screenies, yay)
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
Thanks marco, actually on my gallery2 when I use the Link to the page of the image in bbcode it goes to my resized version. I think there is something wrong with the ItemUrls code when it tries to get the resized ids. I really don't have time to mess with it. Sorry. |
|
F1_Fan
Joined: 2005-08-28
Posts: 2 |
![]() |
Could someone please describe (or post a screenshot) where the "get item URLs" option is? I think I've got the module installed correctly on G2 RC1 (the URLs in the address bar have changed) but using the default G2 theme I can't see where the clickable "get item URLs" is. |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
One is the admin page picture and the other is how you access it the actual urls. |
|
F1_Fan
Joined: 2005-08-28
Posts: 2 |
![]() |
Ah, thanks. I see neither of those options so I guess I don't have the module installed correctly. <edit> OK, I got it... thanks for your screenshot. Two things... 1) I got confused by the existing URL Rewrite option 2) When I looked at the Module admin page more closely I realized that I had to install your 0.8.4 version because the 0.8.3 version wasn't working. |
|
marco@mydub
Joined: 2004-01-07
Posts: 48 |
![]() |
shocksll wrote:
Thanks marco, actually on my gallery2 when I use the Link to the page of the image in bbcode it goes to my resized version. I think there is something wrong with the ItemUrls code when it tries to get the resized ids. I really don't have time to mess with it. Sorry. Steve, What image sizes do you have?ho w many different resized images does your gallery offer? --marco |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
Yea, I only have one resized image size which is 640x480. |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
Would You pls help me where to modify the code to give access as default to ALL users to the geturls link? |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
it's in the permissions. No code modification nessessary. |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
shocksll wrote:
it's in the permissions. No code modification nessessary. uhm, i would like it to be the default for _all_ new and old albums too, automatically. |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
most likely, if you set it on the root album, it will be inherited to all the other albums. Depends on your settings though. Try it out. Just give the group Everybody permissions to view formatted urls on your root album. |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
shocksll wrote:
most likely, if you set it on the root album, it will be inherited to all the other albums. Depends on your settings though. Try it out. Just give the group Everybody permissions to view formatted urls on your root album. ehm, You are right. Sorry Another question/idea: wouldn't it be nice if these url's could be printed out for albums too? |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
the album urls are easy, right click on the album highlight and click copy shortcut (if in IE) or copy link location (firefox). |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
shocksll wrote:
the album urls are easy, right click on the album highlight and click copy shortcut (if in IE) or copy link location (firefox). ;) but thanks..now it's more important for me to find a way to display resized images instead of full sized ones.. |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
In the permissions you can not give people the ability to view full sized images. |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
shocksll wrote:
In the permissions you can not give people the ability to view full sized images. ? in which permissions? in that case what is that on the permission page: ? tell me if i'm wrong |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
Just try it and see what happens. I would say just give everybody the ability to view resized versions and view item. |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
shocksll: what version were you working w/ when you added yer code to rev. 0.84? i don't see the javascript links to the right of the input text areas for IE users to quickly copy the link to their clipboard. |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
I think it was either the version from page 1 labeled 0.8.3 (but the module.inc said 0.8.2) or the one from the post http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=159059#159059. I downloaded them both, in the module.inc they both said 0.8.2. I don't remember which one I used. Is there a better place to find the latest and greatest version? |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
hrm.. u know what? i just dl'ed all of them... and it appears it never made it into a revision. just a post on here that you'd have to override a file. i thought Kirill was gonna work it into 0.8.3 (which, as you stated, shows up as a 0.8.2 revision in the modules section) and i think Kirill intended too as well from his post. but looks like it never made it! ok - i'll take yer 0.8.4 and add it into it, bundle it up, make it 0.8.5, heh! think i might add a couple features too, so it might take a couple days... thx for the quick reply shocksll! |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
No prob, I'm glad we could get the confusion worked out. If you get the opportunity, there are two things that I know that need to get worked out. If you don't have the time to do those things then no prob. Thanks. |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
shocksll wrote:
No prob, I'm glad we could get the confusion worked out. If you get the opportunity, there are two things that I know that need to get worked out. 2. the problem with that resizeid goes into 0 nothing more, as far as i've seen the code, it caused by the geturlsomething.inc not going into the cycle, where resizeid's would be filled up. (and i'm quite stupid that deleted that installation, now i have to find the way again..gonna post it after) |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
whodah wrote:
ok - i'll take yer 0.8.4 and add it into it, bundle it up, make it 0.8.5, heh! niiiiice |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
joe7rocks wrote:
2. the problem with that resizeid goes into 0 nothing more, as far as i've seen the code, it caused by the geturlsomething.inc not going into the cycle, where resizeid's would be filled up. the problematic part: if(!$hasIt){ /* We'll be using this array in the ItemGetURLs.tpl template */ $error['cantviewsource'] = 'true'; /* Because an anonymous user can't access the source image, we'l list ($ret, $resizesTable) = GalleryCoreApi::fetchResizesByItemI if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* I'm a n00b and use this method to loop over the resizes. Seem foreach ($resizesTable as $resizes) { foreach ($resizes as $resize) { $resizeid = $resize->getId(); } } }
If Ya comment the first and the last line $resizeid simply gets filled up with the right number.._in the cases_ where there is really a resized version.. |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
somewhere on the boards, i'll have to seek it out, valiant mentioned that there is a 'doesthumbexist' call of some sort. (that's not the exact name, just a quick post as i'm out of time atm to search for it!) that'll probably be the correct way of fixing it. |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
I have "some" problems with the javascript buttons.. |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
this is the part that i'm hung up on atm... this prevents the resized ID from getting set. in particular, if i remove the first if statement: then that resized ID var gets set and we can go on our merry way. any ideas why this isn't working even for the user 'Site Admin'? /* We're going to be using the status of these permission checks to determine what kind of URLs to generate */ list ($ret, $hasIt) = GalleryCoreApi::hasPermission($itemId, array(), array(3), array('core.viewSource')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } if(!$hasIt) { /* We'll be using this array in the ItemGetURLs.tpl template */ $error['cantviewsource'] = 'true'; /* Because an anonymous user can't access the source image, we'll try using the resized versions instead. */ list ($ret, $resizesTable) = GalleryCoreApi::fetchResizesByItemIds(array($itemId)); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* I'm a n00b and use this method to loop over the resizes. Seems to work okay. */ print_r($resizesTable); foreach ($resizesTable as $resizes) { foreach ($resizes as $resize) { $resizeid = $resize->getId(); } } } /* We now check if access to the resized versions is allowed at all */ list ($ret, $hasIt) = GalleryCoreApi::hasPermission($itemId, array(), array(3), array('core.viewResizes')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } if(!$hasIt) { $error['cantviewresizes'] = 'true'; } |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
this is the part that i'm hung up on atm... this prevents the resized ID from getting set. in particular, if i remove the first if statement: then that resized ID var gets set and we can go on our merry way. any ideas why this isn't working even for the user 'Site Admin'? /* We're going to be using the status of these permission checks to determine what kind of URLs to generate */ list ($ret, $hasIt) = GalleryCoreApi::hasPermission($itemId, array(), array(3), array('core.viewSource')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } if(!$hasIt) { /* We'll be using this array in the ItemGetURLs.tpl template */ $error['cantviewsource'] = 'true'; /* Because an anonymous user can't access the source image, we'll try using the resized versions instead. */ list ($ret, $resizesTable) = GalleryCoreApi::fetchResizesByItemIds(array($itemId)); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* I'm a n00b and use this method to loop over the resizes. Seems to work okay. */ print_r($resizesTable); foreach ($resizesTable as $resizes) { foreach ($resizes as $resize) { $resizeid = $resize->getId(); } } } /* We now check if access to the resized versions is allowed at all */ list ($ret, $hasIt) = GalleryCoreApi::hasPermission($itemId, array(), array(3), array('core.viewResizes')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } if(!$hasIt) { $error['cantviewresizes'] = 'true'; } |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
hrm... nm that last post... i think i see what's going on! should have 0.8.5 posted in a couple hours. |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
oooooook, 0.8.5! compatible out-of-the-box w/ G2 RC2 'kthxbye' and G2 full. older revisions will require the core number changes. things i've changed/added all based off the 0.8.4 release on this thread:
i don't fully understand the permissions system i guess... i cannot get the resized stuff to show up unless i start messing w/ those 'if' statements no matter what i've tried w/ the permissions. and those warnings that we can surpress about unauthenticated users not having access do come up for me. so if someone can tell me how or point me to some docs on what i need to do to allow permissions to access resized images, i'd greatly appreciate it! ooooooook, so i swear there's no 'attachment' button on the new forums... heh! |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
bah, sorry for so many posts in a row... i forgot to add that the new html/bbcode resized to full only work if you can see the resized id on your 'get item urls'... i think... ha ha! seriously: i coded them in the same way the other resized items are coded in. so if u couldn't see previous resized items, then these won't show up either. |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
Thanks for the update!! I'll update the codex. Steve Lineberry |
|
rebel2k
Joined: 2002-10-18
Posts: 39 |
![]() |
great module guys!!!! keep goning on |
|
pippin88
Joined: 2005-09-17
Posts: 23 |
![]() |
Great Mod, very handy since the change in addresses with G2. I also used to use the .thumb stuff to have linked thumbnails. However, (not sure how hard this would be), could you have an option to create a page with every image in the album with code for eg. a clickable thumbnail. That would make my forum image posting so much easier, as I could just select all the code on the page then paste it into a forum and have it all work. Would be even better than the g1 system (which I currently think is easier than this - I just coded in the image names myself within a standard url) |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
You're welcome to modify the module yourself to fit your needs. Steve Lineberry |
|
pippin88
Joined: 2005-09-17
Posts: 23 |
![]() |
I'd really like to, but I have absolutely no idea. I'm guessing it wouldn't be as simple as changing getId to getId for all images or something. |
|
pippin88
Joined: 2005-09-17
Posts: 23 |
![]() |
Could anyone point me in the right direction? I pressume I need to create a new item in the drop down menu, then have that call up a page with the code on it, but It has to somehow do it for every image. |
|
Ozy
Joined: 2005-09-23
Posts: 1 |
![]() |
When i install this on the G2 release, it complains of incompatible API's. Is this mod going to be updated for the release version? Sounds like a great mod. |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
Did you try 0.8.5?? Steve Lineberry |
|
ZyreX
Joined: 2004-03-04
Posts: 43 |
![]() |
I would like it to show the resized pics instead of the thumbnail, as in the 640x480 picture, and with a link to the fullsized.. |
|
Shadow_Wolf
![]()
Joined: 2004-04-03
Posts: 181 |
![]() |
It looks like when the forums were imported to this new board some of the characters didn't properly translate over so it is a mix of characters with ASCII. Can someone repost how to get 0.8.3 to properly work with URL rewrite. The screenshots show that it can but after I have activated it, it appears that the URL links it creates are not short URLs using URL rewrite even though my gallery is. |
|
bhill1429
Joined: 2005-05-04
Posts: 4 |
![]() |
pippin88 wrote:
I'd really like to, but I have absolutely no idea. I would like to see this also I am a ASP novice guy my self and cant seem to get it work any help would be great |
|
pippin88
Joined: 2005-09-17
Posts: 23 |
![]() |
Shadow_Wolf wrote:
It looks like when the forums were imported to this new board some of the characters didn't properly translate over so it is a mix of characters with ASCII. Just a guess, but have you tried 0.8.5? |
|
lwclam
![]()
Joined: 2004-08-01
Posts: 19 |
![]() |
I can't download the 0.8.5. [img:86a3673f48]http://www.chuenhk.com/signature.jpg[/img:86a3673f48] |
|
whodah
![]()
Joined: 2003-05-17
Posts: 96 |
![]() |
wow - good call... i won't be able to get ahold of my buddy who is hosting the file until monday, but i'll get the link straightened out. can't believe i don't have a copy myself, heh! 9 x G1 |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
Here you go. I found it in my browser cache. Steve Lineberry |
|
shocksll
![]()
Joined: 2005-06-22
Posts: 352 |
![]() |
dup post Steve Lineberry |
|
pkx
Joined: 2003-01-27
Posts: 54 |
![]() |
Question: I see from the screenshots (I have not tried the module yet myself), users have the option to view the pre-formatted URLs from drop-downs on the album page. Is it possible to do this directly from the photo page itself? I've modified my gallery to put the photo URL in BBCode right under the picture ([img](g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`")[/img]); however, the variables for the image page URL and thumbnail don't appear to be available from the photo page. I tried pasting some of the code from this module page to confirm this... the URL comes up as main.php and the thumbnail comes up as "unknown." Does anyone know of a way to pass the relevant variables over to the photo page? Thanks! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
the module could be extended by adding a block to it. |
|
pkx
Joined: 2003-01-27
Posts: 54 |
![]() |
valiant wrote:
the module could be extended by adding a block to it. Hm.. I wouldn't know the first thing about how to do that. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
that was rather a suggestion for the authors of the module |
|