Jump to content

kt83

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kt83's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. UPDATE: This is what my home.php file looks like: <?php $tpl = new template; $tpl -> Load("!theme/{$GLOBALS["THEME"]}/templates/home.tpl"); $tpl -> GetObjects(); require_once("home/www/sitename/blog/wp-config.php"); $recentPosts = recent_posts(); $recentComments = get_recent_comments(); $tpl -> AssignArray(array('recent.posts' => '$recentPosts')); $tpl -> AssignArray(array('recent.comments' => '$recentComments')) $tpl-> CleanZones(); $tpl -> Flush(); ?> And inside my home.tpl file, I have, in two different divs, {recent.posts} and {recent.comments} On the page, the recent_posts and recent_comments appear before all the content and in the div where I placed {recent.posts}, appears $recentPosts and {recent.comments} appears $recentComments. I tried it without the ' ' around $recentPosts and $recentComments, but nothing came out. Hope you can figure this out. Thanks for your help!
  2. This is what my home.php file looks like: <?php $tpl = new template; $tpl -> Load("!theme/{$GLOBALS["THEME"]}/templates/home.tpl"); $tpl -> GetObjects(); require_once("home/www/sitename/blog/wp-config.php"); $recentPosts = recent_posts(); $recentComments = get_recent_comments(); $tpl -> AssignArray(array('recent.posts' => '$recentPosts')); $tpl -> AssignArray(array('recent.comments' => '$recentComments')) $tpl-> CleanZones(); $tpl -> Flush(); ?> And inside my home.tpl file, I have, in two different divs, {recent.posts} and {recent.comments} On the page, the recent_posts and recent_comments appear before all the content and in the div where I placed {recent.posts}, appears $recentPosts and {recent.comments} appears $recentComments. I tried it without the ' ' around $recentPosts and $recentComments, but nothing came out. Hope you can figure this out. Thanks for your help!
  3. I got that to work, thanks. But for some reason, I can not place it specifically where I want it. On my site, I use templates so home.php pushes home.tpl. When I place the "recent posts" line of code into the php file, the output is displayed either before or after the content of the home.tpl file automatically. How do I stop it from doing that? I've tried using {} tags to call the variable in the home.tpl but that doesn't work...
  4. Hi All, I have this line in my .php file: $tpl -> AssignArray(array('my.tag' => 'Text Goes Here')); Instead of "Text Goes Here", I 'd like to use <?php recent_posts(); ?> as a value. How can I do that? Thanks!
  5. Hi Larry, Thanks for the tip. I've looked at that article before but it's not quite what i'm looking for. This is how my site works: I have a home.php file which has the following codes: <?php /* Check Structure Availability */ if (!defined("CORE_STRAP")) die("Out of structure call"); $tpl = new template; $tpl -> Load("home"); $tpl-> CleanZones(); $tpl -> Flush(); ?> Then I have a home.tpl file which has the html for the content. Let's say I want to place the output of the plugin in the middle of my content area, how would I do that? thanks again.
  6. Hi All, I'm trying to display the results of a WP plugin on a page that isn't wordpress driven. I was told that these two lines of codes should do the trick: <?php require_once("/home/useracct/public_html/wordpress/wp-config.php"); ?> <?php echo recent_posts(); ?> On my site, I use .tpl (template) files and .php files to push the templates. I've already created the space where I want the results to appear on the user side but I don't know how to implement it. So where would I include these two lines of PHP codes? Thanks!
  7. ""Admin <email>" is not an email address." Thanks for noticing, but I only put that there for this purpose. I have a real email address in place of that. I think the problem lies somewhere in here: if( isset($_POST["btnSubmit"]) ){ { ${$var} = $val; } or in here: <form method="post" id="contactForm"> Do I need the "id="contactForm"" in there? I tried it without that and it didn't work. What is the relationship between the contactForm and the mailto email address?
  8. Hi, I've created a survey but cannot get it to send the results to an email address. I know for sure it did work on the first try but for some reason when I tried to send it again without making any changes to it it wouldn't send. Could anyone tell me if this looks right? FYI: The "id=contactform" that I use is a contact for I created for the feedback page. I wonder if I'd have to create a different one for the survey... //PHP FOR SENDING SURVEY RESULTS TO EMAIL////////////////////////// if( isset($_POST["btnSubmit"]) ){ { ${$var} = $val; } $body_body .= " Gender: | " . $gender . "\n"; $body_body .= " Age Group: | " . $age . "\n"; $to = 'Admin <email>'; $subject = 'Survey Results'; $body = $body_body; mail($to, $subject, $body); } /////END OF PHP///// /////TPL FILE///// <form method="post" id="contactForm"> <b>What is your gender?</b> <br /><br /> <table border="0"> <tr> <td><input type="radio" name="gender" value="male"> Male </td> </tr> <tr> <td><input type="radio" name="gender" value="female"> Female</td> </tr> </table> <br /><br /> <b>What is your age group?</b> <br /><br /> <table border="0"> <tr> <td><input type="radio" name="age" value="under20" /> Under 20 </td> </tr> </table> <br /><br /> <input type="submit" value="submit" name="submit" /> </form> ////END OF TPL//// Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.