PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

  • Index
  •  » Mod requests
  •  » Lightbox or Slimbox with cURL, alternative to URL file-access disabled

#1 2007-03-17 23:36:21

xonek
New member
Registered: 2007-03-16
Posts: 7

Lightbox or Slimbox with cURL, alternative to URL file-access disabled

My host is using PHP 4 and 5 and they disabled URL file-access, allow_fopen_access is dsabled, and anything like it. I know there is already a lightbox v2.0 mod, but it doesnt work cause it uses the fopen and it wont create thumbnails and just gives error when anyone uses [img] tag. I beleive this is because, its trying to get img size from the url to create the thumbnail. Robert_h hasnt been around that ive seen sad

If its possible, can someone create a script for the [img] tags that use curl? Or edit this snippet:

http://gunhands.pastecode.com/17562

Offline

 

#2 2007-03-17 23:54:38

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Lightbox or Slimbox with cURL, alternative to URL file-access disabled

I'm not sure cURL will provide a way around this, unless you use it do download every image.

But you could always try this:
http://elbekko.pastebin.ca/399321

It'll be quite more efficient too (the image is only accessed once, instead of twice).


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#3 2007-03-18 00:06:43

xonek
New member
Registered: 2007-03-16
Posts: 7

Re: Lightbox or Slimbox with cURL, alternative to URL file-access disabled

Well I got closer, found this url http://forum.dreamhosters.com/3rdparty/ … o-CURL.htm

I used the code the guy posted in the reply, replaces $filename with $url and $hwimage with $myfilesize  you can see the difference in your pastebin here
http://elbekko.pastebin.ca/diff.php?id1 … id2=399392

Only thing is, when it creates the thumbnails in the post, they are 100% width, so if i use a wide theme, they are bigger. I want them to be a fixed width of like 100px or somthing

Last edited by xonek (2007-03-18 01:08:12)

Offline

 

#4 2007-03-18 04:32:49

xonek
New member
Registered: 2007-03-16
Posts: 7

Re: Lightbox or Slimbox with cURL, alternative to URL file-access disabled

Yes, i fixed it smile

I added curl to create temp image and get dimensions, but it was showing the thumbnails at 100% width.. so i created a new class for .limg and made it 150px wide.. so its fixed big_smile

thanks for your help

Offline

 

#5 2008-07-19 21:07:17

xSDMx
Member
Registered: 2007-12-06
Posts: 25
Website

Re: Lightbox or Slimbox with cURL, alternative to URL file-access disabled

How did you go about this?

Offline

 
  • Index
  •  » Mod requests
  •  » Lightbox or Slimbox with cURL, alternative to URL file-access disabled

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.