Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 07-06-2005, 12:15 AM
tami Offline
pp veteran
 
Join Date: Jun 2005
Posts: 73
reloading the current page once someone submits a comment?

hi,

i'm trying to reload my page once someone submits a comment rather than get the "thank you for visiting and taking the time to comment" page (which is taken from lang_whatever.php)

i suppose it has something to do with this code (below, taken from index.php), so how do i modify it to bypass this thank you page and just reload the current page? obviously, my php skills are lacking in this area -- i've been toying around with it and have had no luck

Code:
 <!-- pixelpost saving comment -->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title><?php echo $lang_comment_page_title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="admin/admin_index.css" type="text/css" />
</head>
<body>

<?php
echo "$lang_comment_thank_you<p />$extra_message";
if(!$_GET['popup']) {
    echo "<a href='index.php?showimage=$parent_id'>$lang_comment_redirect</a>";
        } else {
        echo"<a 

href='index.php?popup=comment&showimage=$parent_id'>$lang_comment_redirect</a>";
       }
    echo "</body></html>";
   }
many thanks in advance.
Reply With Quote
  #2  
Old 07-06-2005, 02:19 AM
tami Offline
pp veteran
 
Join Date: Jun 2005
Posts: 73
ok, got it... simple fix (i knew it was)

Code:
 <!-- pixelpost saving comment -->
<?php
echo "<meta http-equiv='refresh' content='0;URL=index.php'>";
   }
that's all that is needed to replace the code below.
Reply With Quote
  #3  
Old 07-06-2005, 04:18 AM
Connie
Guest
 
Posts: n/a
tami,

as you found out yourself, the solution lies mostly in the skin, the template, not the code...

you must not dive deep into the code to acchieve easy solutions, :=)
Reply With Quote
  #4  
Old 07-19-2005, 03:30 AM
tami Offline
pp veteran
 
Join Date: Jun 2005
Posts: 73
i also made a mistake... so here's the fix (compatible with 1.4.2)

in index.php, just put the following:

Code:
<!-- pixelpost saving comment -->
<?php
echo "<meta http-equiv='refresh' content='0;URL=index.php?showimage=$parent_id'>"; 

   }
that's all that there is to it. it bypasses the thank you page and reloads the page you just commented on, showing your comment (or it should based on your template)

hope that helps others
Reply With Quote
  #5  
Old 10-10-2005, 11:41 PM
jasonspix Offline
forum loafer
 
Join Date: Oct 2005
Posts: 2
It works!

I used your code and got it working! Thanks much.
Reply With Quote
  #6  
Old 02-10-2006, 10:57 PM
draaku Offline
forum loafer
 
Join Date: Feb 2006
Posts: 2
Do I delete everything from under <!-- pixelpost saving comment -->
and put in your code? I'm php noob...thanks
Reply With Quote
  #7  
Old 02-10-2006, 11:35 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
nope, there is no need to delete anything! Just find the line of code the previous poster mentioned and replace the value of content to 0.

For example, you might see something like this when you look at your code:

echo "&lt;meta http-equiv='refresh' content='8;URL=index.php?showimage=$parent_id'>";

Notice I made the 8 bold, this is the number that needs to be changed to 0.
Look at the example below. Notice the changed number:

echo "&lt;meta http-equiv='refresh' content='0;URL=index.php?showimage=$parent_id'>";

You only need the change the number highlighted above in bold text. Nothing else needs to be altered.

notice: i explained this using the original posters code. it might have changed when newer versions were released. as long as you change that number, it still should work.
Reply With Quote
  #8  
Old 03-05-2009, 11:46 AM
Kev Offline
forum loafer
 
Join Date: Jan 2009
Posts: 5
when posting a comment it redirects me to a "thank you page"
in PP 1.7.1 how can i reload the page without the redirect to "thank you ........." page
Reply With Quote
  #9  
Old 03-05-2009, 12:59 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Hi Kev, please read our documentation: http://www.pixelpost.org/docs/FAQ/Fr...lated#ThankYou
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 06:05 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs