[Plugin: Pierre's Wordspew] fixes to archive page
-
hi, i fix some mistake and old code in archive
wordspew_archive.php1st – config load
fromrequire_once('../../../wp-config.php'); include_once ('common.php'); if (!isset($table_prefix)) { $html = implode('', file("../../../wp-config.php")); $html = str_replace ("require_once", "// ", $html); $html = str_replace ("<?php", "", $html); eval($html); }
to
require('../../../wp-load.php'); include_once ('common.php');
2nd not working pagination (show only 1st page of archive)
it happened because not work code for get archive lenght (table rows)
original$wpdb->hide_errors(); $SQL="SELECT SQL_CALC_FOUND_ROWS id, time, name, text, url, ipaddr, email FROM ".$_SESSION['tb_prefix']."liveshoutboxarchive "; $SQL.="WHERE cat='".mysql_real_escape_string($cat)."' ORDER BY id DESC LIMIT ".$offset.",".$limit; $results = $wpdb->get_results($SQL); $wpdb->show_errors(); $result = mysql_query('SELECT FOUND_ROWS() AS total'); $data = mysql_fetch_assoc($result); $total=$data['total'];
fixed
$wpdb->hide_errors(); $SQL="SELECT SQL_CALC_FOUND_ROWS id, time, name, text, url, ipaddr, email FROM ".$_SESSION['tb_prefix']."liveshoutboxarchive "; $SQL.="WHERE cat='".mysql_real_escape_string($cat)."' ORDER BY id DESC LIMIT ".$offset.",".$limit; $results = $wpdb->get_results($SQL); $data = $wpdb->get_results('SELECT FOUND_ROWS() AS total'); $wpdb->show_errors(); $total=$data[0]->total;
also i made translation in russian for 10-20 messages (and two corrected)
https://hotfile.com/dl/88597633/bf0122e/lang_rus.zip.htmhope it helped somebody
and thank for your work, Pierre Sudarovich. great chat anyway.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Pierre's Wordspew] fixes to archive page’ is closed to new replies.