TinyPortal

Development => Support => Topic started by: GhostRider2110 on October 12, 2010, 10:02:22 PM

Title: Help integrating CoffeeCup web forms with TP.
Post by: GhostRider2110 on October 12, 2010, 10:02:22 PM
Hi All...

Link to my site: http://www.usscalemasters.org (http://markedtest.elementfx.com/forum/)
SMF version: SMF 1.1.11
TP version: TP 1.0 B5-2
Theme name and version: Modified Blueskies

Hope I can find a solution for this.  I use CoffeeCup Web Form Builder for help build some neat forms pretty easily.  My problem is getting them integrated into SMF and TP.  I have tried to create an HTTP article. and put the stub code provided.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><center>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=
7,0,0,0" id="CC7112404" align="middle" height="800" width="600"><param name="movie" value="color.swf"><param name="quality" value="high"><param na="" me="FlashVars" value="xmlfile=color.xml&w=600&h=800"><param name="scale" value="noscale"><param name="salign" value="lt"><param name="bgcolor" v="" alue="#ffffff"><param name="wmode" value="transparent"><embed src="color.swf" flashvars="xmlfile=color.xml&w=600&h=800" quality="high" bgcolor="#
ffffff" name="CC7112404" wmode="transparent" scale="noscale" salign="lt" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="800" width="600"> </object>
</center>


I am hoping it is just a matter of placing the xml and swf files in the right place or modifying this code to find them. 

I have gotten it to work, but only as a separate page, directory, and calling it via iframe... but I want to have the complete SMF/TP framework and control. 

Thanks for any help...

See-ya
Mitch
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: Freddy on October 12, 2010, 10:18:28 PM
First impressions I would agree with you.  This bit :

<embed src="color.swf"........etc

Any article/block is going to look in the forum root for the files, as everything is based around index.php  So any file locations with be relative to that.

So you could put them in the forum root directory alongside the index.php

Or to be tidy, which I always prefer, put them in a folder called something like 'flash_form' and refer to them in your code like this :

<embed src="flash_form/color.swf".......etc

I'm assuming the swf file will find the other files relative to itself...if they are all in the same folder together.

I'm not very experienced with using Flash, but see how that goes.  There's probably other parts that might need changing too, but it's getting late here and I only took a quick look.

If that doesn't work then we probably need more details and copies of the files to play around with.
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: GhostRider2110 on October 13, 2010, 02:12:40 PM
Thanks, will let you know what happens... --Mitch
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: GhostRider2110 on October 13, 2010, 07:56:14 PM
Ok, try this again.. had nice reply and after hitting post realised the files I tried to attach were not allowed.. hahaha   :2funny:

Here we go again..

The base for the forums is /www/forums/
I created a directory color_form copied the files into there...  Modified the code as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head>
<body bgcolor="#FFFFFF"><center>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="800" id="CC7112404" align="middle"><param name="movie" value="color_form/color.swf"/><param name="quality" value="high" /><param name="FlashVars" VALUE="xmlfile=color_form/color.xml&w=600&h=800"/><param name="scale" value="noscale" /><param name="salign" value="lt" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" /><embed src="color_form/color.swf" FlashVars="xmlfile=color_form/color.xml&w=600&h=800" quality="high" bgcolor="#ffffff" width="600" height="800" name="CC7112404"  wmode="transparent" scale="noscale" salign="lt" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
</center></body></html>


Setup article as HTML with the code above in it... Still no go.  I added the color_form to the color.xml file as well, still would not work.   Only way to make it work is to use external article type without the color_form modifications.  But I would rather not do it that way to keep it under the forum control...  Keep non forum users from accessing the form..

Attached is a zip from with all the files created by the web form builder program.  Thanks for any help...

See-ya
Mitch
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: Freddy on October 13, 2010, 11:21:11 PM
Okay I seem to have got somewhere on this.

You don't want all the DOCTYPE, head etc as SMF already does that.

So for the HTML article/block code all you need is this part of the code :

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="800" id="CC7112404" align="middle">
<param name="movie" value="color_form/color.swf"/>
<param name="quality" value="high" />
<param name="FlashVars" VALUE="xmlfile=http://localhost/Forum4RC3/color_form/color.xml&w=600&h=800"/>
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="bgcolor" value="#ffffff" />
<param name="wmode" value="transparent" />
<embed src="color.swf" FlashVars="xmlfile=color.xml&w=600&h=800" quality="high" bgcolor="#ffffff" width="600" height="800" name="CC7112404"  wmode="transparent" scale="noscale" salign="lt" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


Basically I used the code found in the color.html file you supplied and changed this line :

<param name="movie" value="color_form/color.swf"/>

So it points to the folder with the swf file in it.

And this line which you will need to change to a FULL URL to where your color.xml file is :

<param name="FlashVars" VALUE="xmlfile=http://full/path/here/color_form/color.xml&w=600&h=800"/>

It's the only way I can find to get everything to link up, but hey it seems to work.

The other thing is to change color.xml as there are paths in there to the images and otherwise it doesn't find them.

Eg :

<image
image="color_form/color1.jpg"
x="25"
y="100"
></image>


I also added the color_form directory to the top of that file too, so it finds color.php

To save you doing that I have attached the new color.xml based on your requirements.

I can't test the emailing part, but it looks like that should work okay.

I hope that helps get you started.
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: GhostRider2110 on October 14, 2010, 05:35:43 PM
Thanks... 

Here is exactly what I put in for he HTML article:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="800" id="CC7112404" align="middle">
   <param name="movie" value="color_form/color.swf"/>
   <param name="quality" value="high" />
   <param name="FlashVars" VALUE="xmlfile=http://www.usscalemasters.org/forums/color_form/color.xml&w=600&h=800"/>
   <param name="scale" value="noscale" />
   <param name="salign" value="lt" />
   <param name="bgcolor" value="#ffffff" />
   <param name="wmode" value="transparent" />
   <embed src="color.swf" FlashVars="xmlfile=color.xml&w=600&h=800" quality="high" bgcolor="#ffffff" width="600" height="800" name="CC7112404"  wmode="transparent" scale="noscale" salign="lt" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


But I still can't get it to work. Here is the URL which should access it currently:

http://usscalemasters.org/forums/index.php/page,68 (http://usscalemasters.org/forums/index.php/page,68)

See-ya
Mitch
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: Freddy on October 14, 2010, 06:14:37 PM
Look like your tidy url mod is messing it up...

http://usscalemasters.org/forums/index.php?page=68

That at least loads, and your xml file is there and okay, but it can't find it.

Doesn't look like it will work with that mod.
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: GhostRider2110 on October 14, 2010, 07:20:04 PM
Here is the list of mod's....

SMF 1.0.16 / 1.1.8 Update     1.0
Ad Managment     2.3.1
Custom Profile Field Mod     3.20
Stop Spammer     2.3
Welcome Topic Mod     2.0.2
reCAPTCHA for SMF     0.9.7
SMF 1.0.19 / 1.1.11 Update     1.0
Custom Form Mod     1.6
TinyPortal     1.101
User Email System     1.3
Aeva Media     2.02
DisableTemplateEval     1.2
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: Freddy on October 14, 2010, 07:30:44 PM
Which one does the custom URLs ?  It's usually 'tidy url' or something like that.

I don't think it will work unless you remove whatever is reformatting your URLs.
Title: Re: Help integrating CoffeeCup web forms with TP.
Post by: GhostRider2110 on October 14, 2010, 07:34:10 PM
Will have to look around and see.  I didn't think I had that installed anymore.  But may be something left behind from an update.  Thanks --Mitch