Inspirationally

Listing Admin Bug fix + php 7.3. compatibility

Listing Admin is great, but there are some bugs and not php 7.3. compatible.

For php 7.3. compatibility there are just some minor changes needed. On lesser versions, you will just get “Error: mysqli depracated warnings” in your error_log

To solve this mysql issue, you can put this into your jac.inc.php instead (unfortunately you can’t just simply replace all mysql with mysqli), from

/**

* Get MySQL link!
*/

till the very bottom of the file, put this:

/**
* Get MySQL link! (updated to mysqli by inspirationally)
*/
$connect = mysqli_connect($database_host, $database_user, $database_pass,$database_name)
or die(‘<p><span class=”error”>Error:</span> You cannot currently connect to MySQL.’ .
‘ Make sure all variables are correct in <samp>rats.inc.php</samp>; if it is a random’ .
‘ error, wait it out and see if it\’ll magically disappear.</p>’);
$database = mysqli_select_db($connect,$database_name)
or die(‘<p><span class=”error”>Error:</span> You cannot currently connect to your database.’ .
‘ Make sure all variables are correct in <samp>rats.inc.php</samp>; if it is a random’ .
‘ error, wait it out and see if it\’ll magically disappear.</p>’);

/**
* Aaaaaa-aaa-and run query~!
*/
$select = “SELECT `text` FROM `$_ST[options]` WHERE `name` = ‘adm_path’ LIMIT 1”;
$true = mysqli_query($connect,$select);
if($true == false) {
exit(“<p class=\”errorButton\”><span class=\”error\”>ERROR:</span> Unable to select the specified option.” .
” Make sure your options table exists.</p>\n”);
}
$getItem = mysqli_fetch_array($true);
define(‘STPATH’, $getItem[‘text’]);
?>

Now it should be mysqli compatible.

Additionally, there are some minor bugs, that I solved with this:

Error: When trying to delete a joined listing, clicking the delete button under “action” shows this error:
Fatal error: Call to a member function cleanMys() on a non-object in /home/user/public_html/listingadmin/joined.php on line 512

Solution:

in joined.php in line 512, find

$id = $listingadmin->cleanMys($_GET[‘d’]);

replace it with

$id = $tigers->cleanMys($_GET[‘d’]);

Error: the pagination on the admin joined page does not work

Solution:

around line 222 change

if($pages > 10) {

to

if($pages > 1) {

around line 202 ff. change to

$this->range = 10;
$this->page = !isset($_GET[‘p’]) || !is_numeric($_GET[‘p’]) ? 1 :
$tigers->cleanMys($_GET[‘p’]);
$this->next = $this->page + 1;
$this->prev = $start – 1;

around line 230 change

if($this->page != 1) {

to

if($this->page != 1 && $this->page > 6) {

 

 

add https:// check

it’s in file listings.php Line 744 change

if(strpos($url, ‘http://’) === false) {
 

to

    if((strpos($url, ‘http://’) === false && strpos($url, ‘https://’) === false)){
 

line 1291 change

  if(strstr($url, ‘http://’) === false) {
 

to

  if((strpos($url, ‘http://’) === false && strpos($url, ‘https://’) === false)){

 

unsolved: 

  1. Error: the pagination on the admin wishlist page does not work
  2. When using the most recent version of listing admin it only shows 2 pages of updates.

 

One Comment

  • Monique says:

    hey affie! just sliding through to let you know that theres a new blog up with vote.. check it out? Love the update to the coding!

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.