sharmaine
Forum Replies Created
-
Oh i think i know where to get it. Thanks anyway
Hello,
Can you please tell me where to get the wp-polls? Thank you very much
Forum: Fixing WordPress
In reply to: Comments Popup problem, pls help!i dont have much knowledge on php too, just tried my luck good thing it works. open your wp-comments-post.php and look for for $location = get_permalink($comment_post_ID); then after that put this: $location2 = ‘<path where your wp-comments-popup.php is>’;
then look for header(“Refresh: 0;url=$location”); and replace $location with $location 2. Do the same for header(“Location: $location”);
If you need help, pop me ym: meeh_sharmaine thanks
Forum: Plugins
In reply to: Next/Previous NavigationAm not sure if this would help but i find this somewhere in the site a couple of months ago.
=========
<?php
/*
Plugin Name: Page Navigation
Plugin URI: https://www.lesterchan.net/portfolio/programming.php
Description: Adds A Page Navigation To Your WordPress. Please Make Sure Post Paged Is Turned On.
Version: 1.2
Author: GaMerZ
Author URI: https://www.lesterchan.net
*/function page_navigation($before=”, $after=”, $prelabel=’?? ‘, $nxtlabel=’ ??’) {
global $p, $what_to_show, $request, $posts_per_page, $wpdb;
global $HTTP_SERVER_VARS, $paged;
global $querystring_start, $querystring_equal, $querystring_separator;
if (empty($p) && ($what_to_show == ‘paged’)) {
$nxt_request = $request;
$whichpage = $_GET[‘paged’];
if(empty($whichpage)) $whichpage = 1;
$qstr = $HTTP_SERVER_VARS[‘QUERY_STRING’];
if (!empty($qstr)) {
$qstr = preg_replace(“/&paged=\d{0,}/”,””,$qstr);
$qstr = preg_replace(“/paged=\d{0,}/”,””,$qstr);
} elseif (stristr($HTTP_SERVER_VARS[‘REQUEST_URI’], $HTTP_SERVER_VARS[‘SCRIPT_NAME’] )) {
if (” != $qstr = str_replace($HTTP_SERVER_VARS[‘SCRIPT_NAME’], ”, $HTTP_SERVER_VARS[‘REQUEST_URI’]) ) {
$qstr = preg_replace(“/^\//”, “”, $qstr);
$qstr = preg_replace(“/paged\/\d{0,}\//”, “”, $qstr);
$qstr = preg_replace(“/paged\/\d{0,}/”, “”, $qstr);
$qstr = preg_replace(“/\/$/”, “”, $qstr);
}
}
if ($pos = strpos(strtoupper($request), ‘LIMIT’)) {
$nxt_request = substr($request, 0, $pos);
}
$nxt_result = $wpdb->query($nxt_request);
$numposts = $wpdb->num_rows;
$max_page = ceil($numposts / $posts_per_page) ;echo $before.’Pages (‘.$max_page.’) : <b>’;
if ($whichpage >= 4)
echo ‘?? First … ‘;
previous_posts_link($prelabel);
for($i = $whichpage – 2 ; $i <= $whichpage +2; $i++) {
if ($i >= 1 && $i <= $max_page) {
if($i == $whichpage)
echo ‘[‘.$i.’] ‘;
else
echo ‘‘.$i.’ ‘;
}
}
next_posts_link($nxtlabel, $max_page);
if (($whichpage+2) < ($max_page))
echo ‘ … Last ??‘;
echo ‘</b>’.$after;
}
}
?>Forum: Fixing WordPress
In reply to: Comments Popup problem, pls help!hello kitchie. what i did is to manually assign my blog path + wp-comments-popup.php to another variable, say $location2 and i replaced $location with $location2. However, this is manually assigning the url (say https://deep-reflections.net/blog/wp-comments-popup.php ) it’s working now but i want to ask the gurus here how can i possibly get the variable that will direct me automatically to wp-comments-popup.php without having to manually assign the whole path. Though my popup comments seems to be working properly now, i still wanna know how to do that without manually assigning the path.
Forum: Fixing WordPress
In reply to: Comments Popup problem, pls help!I think i know what seems to be the problem. IN the wp-comments-post.php, the popup page is being refreshed by this command: header(“Location: $location”); however the value of $location is my frontpage (https://deep-reflections.net/blog) instead of https://deep-reflections.net/blog/wp-comments-popup.php is there any way where i can get the current page being loaded and not the frontpage? Thanks
by the way, what is this command for: $location = get_permalink($comment_post_ID); ? Thanks
Forum: Fixing WordPress
In reply to: Comments Popup problem, pls help!Thanks a lot