| View previous topic :: View next topic |
| Author |
Message |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Thu Aug 20, 2009 10:18 pm Post subject: [Solved] Wordpress + DLG + Custom Template Pge |
|
|
I have such a headache (LOL)
I am creating a wordpress site. Done works perfectly.
I installed DLG. Done works perfectly.
Problem:
I have a page (not post) to download a free product. (yes, it's set up in DLG correctly). I got the code and put it into the wordpress page.
When I look at the page, it does not show the box to input name and email but it does show the dlg code.
After reading this in wordpress docs
http://codex.wordpress.org/Pages#What_Template_is_used_to_Display_a_Particular_Page.3F
Apparently, I need a custom template .php page for my dlg free product code to work in my wordpress page.
Is this correct?
If this isn't correct which I hope because I don't know php, is there an EZ fix?
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com
Last edited by Judith on Sun Aug 23, 2009 6:38 pm; edited 1 time in total |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
Posted: Thu Aug 20, 2009 11:02 pm Post subject: |
|
|
Hi Judith,
Was it just a signup page you're looking to create?
By default, Wordpress doens't allow PHP code to be run in posts or pages.
There are plugins you can get that'll allow the code to run, if you like.
Or, possibly an easier way out is just to create your own page, and upload it to your site, and then just link to that page from your wordpress blog.
Does that make sense?
cheers
Sam _________________ Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard |
|
| Back to top |
|
 |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Fri Aug 21, 2009 8:16 pm Post subject: |
|
|
Trouble is Sam I'm not sure I could duplicate the look of my wordpress site and I do want my sign in page to look the same.
I have searched Google, Bing, Wordpress docs and forum and found 5 different php plugins. Found 2 more today.
There seems to be a conflict with your code. Because I can input other php code for a test and it will work.
See the warning I get on:
http://www.ezmanifesting.com/test
There must be someone on this forum that knows what that warning is and how I can fix it.
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
|
| Back to top |
|
 |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Sun Aug 23, 2009 3:14 am Post subject: |
|
|
Sam,
It's not a folder. The page is called Test in Wordpress. And the permalink uses domain name with %postname%
or to be more exact:
http://www.ezmanifesting.com/test
So how to I change my pages to have an extension that DLG understands?
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com
Last edited by Judith on Sun Aug 23, 2009 2:02 pm; edited 1 time in total |
|
| Back to top |
|
 |
espradley Moderator
Joined: 29 Nov 2008 Posts: 844 Location: USA - Georgia
|
Posted: Sun Aug 23, 2009 4:44 am Post subject: .. |
|
|
Hey Judith,
It looks like wordpress is tricking the PHP code to thinking its in another directory. I would have to review your code to be sure, but try the following:
| Code: | <?php
if(!$_POST['SubmitEmail']){
$pathToCBDM = "dlg/";
}
else {
$pathToCBDM = "../dlg/";
}
$cbdmProduct = 6;
include ($pathToCBDM."cbdm.php");
?> |
Make sure you change $cbdmProduct=6 to the correct product number!
Good luck! _________________ Eddie Spradley - DLGuard Moderator and PHP Developer
www.dlgadvance.com
Free WordPress DLGuard Membership Plugin (limited time) - http://dlgadvance.com/products/dlguard-wordpress-membership-plugin/ |
|
| Back to top |
|
 |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Sun Aug 23, 2009 2:11 pm Post subject: |
|
|
Eddie,
Sorry that didn't work either and yes I changed the product number
Still have the same Warning error in right sidebar:
http://www.ezmanifesting.com/test/
I tried it with all 3 php plugins.
Open to a lot more suggestions,
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com |
|
| Back to top |
|
 |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Sun Aug 23, 2009 2:38 pm Post subject: |
|
|
I changed the permalink from %postname% to %post_id% and now the picture shows up but the warning is still there.
http://www.ezmanifesting.com/test
Although I think the sign up box is too large for the area and the reason the top is wonky.
And when I put a test name in the sign up box, I get this:
Warning: Unknown(../dlg/cbdm.php): failed to open stream: No such file or directory in /var/www/EZManifesting/wp-content/plugins/php-execution-plugin/includes/class.php_execution.php(273) : eval()’d code on line 11
Warning: (null)() [function.include]: Failed opening ‘../dlg/cbdm.php’ for inclusion (include_path=’.:/usr/lib/php’) in /var/www/EZManifesting/wp-content/plugins/php-execution-plugin/includes/class.php_execution.php(273) : eval()’d code on line 11
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com
Last edited by Judith on Sun Aug 23, 2009 2:43 pm; edited 1 time in total |
|
| Back to top |
|
 |
espradley Moderator
Joined: 29 Nov 2008 Posts: 844 Location: USA - Georgia
|
Posted: Sun Aug 23, 2009 2:40 pm Post subject: .. |
|
|
Hey Judith,
I researched the issue and the error your getting usually means that the DB info is incorrect. So in your case, I think that DLguard and Wordpress are using the same db variables at some point and this is causing a clash.
The easiest way to fix this is to use a pop up window or an inline frame to display the free download section.
If you wanted to try something a little harder you could probably change the DB variables for WP. You may have to setup the variables that you create as globals. _________________ Eddie Spradley - DLGuard Moderator and PHP Developer
www.dlgadvance.com
Free WordPress DLGuard Membership Plugin (limited time) - http://dlgadvance.com/products/dlguard-wordpress-membership-plugin/ |
|
| Back to top |
|
 |
espradley Moderator
Joined: 29 Nov 2008 Posts: 844 Location: USA - Georgia
|
Posted: Sun Aug 23, 2009 2:44 pm Post subject: .. |
|
|
Another idea that may work is that you create a custom form with those details in it and post it to a page that has the code in it and name it something like freeproduct.php
So create a php file with the code in it (not the one I gave you but the one that dlguard gives you) and put this form on the page you desire.
| Code: | <form name="form1" method="post" action="freeproduct.php">
<input name="cbdmName" type="text" id="cbdmName" value=""><input name="cbdmEmail" type="text" id="cbdmEmail" value="">
<input name="cbdmEmailRepeat" type="text" id="cbdmEmailRepeat" value="">
<input name="cbreceipt" type="hidden" value="Free download">
<input type="submit" name="SubmitEmail" value="Submit">
</form> |
Make sure you change the action of the form to post to the php page you created with the DLGuard code in it.
I have no idea if this will work or not, but it should. _________________ Eddie Spradley - DLGuard Moderator and PHP Developer
www.dlgadvance.com
Free WordPress DLGuard Membership Plugin (limited time) - http://dlgadvance.com/products/dlguard-wordpress-membership-plugin/
Last edited by espradley on Sun Aug 23, 2009 4:56 pm; edited 1 time in total |
|
| Back to top |
|
 |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Sun Aug 23, 2009 2:47 pm Post subject: |
|
|
I'll try the pop up window approach and see if that might work. Thanks for the idea.
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com |
|
| Back to top |
|
 |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Sun Aug 23, 2009 3:29 pm Post subject: |
|
|
OK the form worked!!!!!!!!!!!!!!!!!!!!!!
Thank you Eddie!
I am such a happy camper
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com |
|
| Back to top |
|
 |
espradley Moderator
Joined: 29 Nov 2008 Posts: 844 Location: USA - Georgia
|
|
| Back to top |
|
 |
espradley Moderator
Joined: 29 Nov 2008 Posts: 844 Location: USA - Georgia
|
|
| Back to top |
|
 |
Judith
Joined: 05 Jun 2008 Posts: 83
|
Posted: Sun Aug 23, 2009 4:34 pm Post subject: |
|
|
Ok Eddie,
We have a slight problem. I put the .php files on my server for each free product with the correct product numbers in the code
When testing Train Your Brain in left side bar, it will give me download page.
Creative IQ when I fill in the sidebar tells me I didn't fill out all the fields. I did but its trying to go to Train Your Brain download page
CLt on the right sidebar gives me the Train Your Brain download page??
I thought it might be that the Form was conflicting so I named them Form 1, Form 2, Form 3 in the code you provided but that didn't help either.
We are getting closer to a solution
http://www.ezmanifesting.com
Judith _________________ Making the Complicated EZ!
EZ step by step Videos show you how to make
videos, ebooks, ebook covers and audio books
http://www.agoodread.com |
|
| Back to top |
|
 |
|