Hi,

I try to use the wrapper feature, but it's not working. Maybe it's something wrong with my syntax, I dont know.

I want to use this module to slice my old archive html web page into node in Drupal.

My exemple :
- Here the html web page : http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html

When I dont use the wrapper feature, all is working :
[[[http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html width=700px height=100% allowtransparency=false ]]]

With the wrapper feature, I tried few syntax, but I always get an error message :
Not working : [[[http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html wrapper=htmlpage]]]
Not working : [[[http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html width=700px height=100% allowtransparency=false wrapper=htmlpage]]]
Not working : [[[http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html width=100% height=100% allowtransparency=false wrapper=htmlpage]]]
Not working : [[[http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html width=700px height=700px wrapper=htmlpage]]]

The error is a file not found, but the path is correct, it's possible to load this path directly into a browser, and the path is working when I dont use the wrapper feature :
* File http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html not found
* File http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html not found
* File http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html not found
* File http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html not found
* File http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html not found
* File http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html not found
* File http://net.oboro.koumbit.org/oldsite/archive/exhib9394/biswas.html not found

Is it my syntax, or is it something else ? (maybe an .htaccess problem ?).

Thanks a lot for this very usefull module.

:-)

Hugo

CommentFileSizeAuthor
#3 insertFrame.module.txt6.05 KBMarcElbichon

Comments

MarcElbichon’s picture

Insert_frame use file_exists. Before php 5.0, this function does not verify urls.

Can you modify insertFrame.module and remplace :


function theme_insertFrame_render_wrapper($value, $params) {
	$output="";
	if (file_exists($params["url"])) {
		$code = utf8_encode(file_get_contents($params["url"]));
		$function =  "insertFrame_render_wrapper_" . $value;
		$output = insertFrame_render_tag("wrapper_" . $value,$code, $params);
	}
	else {drupal_set_message(t("File %file% not found",array("%file%"=>$params["url"])) ,"error");}	
	return $output;
}

by

function theme_insertFrame_render_wrapper($value, $params) {
	$output="";
	$code = utf8_encode(file_get_contents($params["url"]));
	$function =  "insertFrame_render_wrapper_" . $value;
	$output = insertFrame_render_tag("wrapper_" . $value,$code, $params);
	return $output;
}
Hobbes-2’s picture

Working !

:-)

Thanks a lot!

Will you add a patch to the next version ?

Thanks again,

Hugo

MarcElbichon’s picture

StatusFileSize
new6.05 KB

Yes. Attachment is not a patch so you can copy and rename it to insertFrame.module

MarcElbichon’s picture

Status: Active » Fixed
MarcElbichon’s picture

Status: Fixed » Closed (fixed)