Forum Replies Created

Viewing 15 replies - 46 through 60 (of 150 total)
  • Plugin Author john ackers

    (@john-ackers)

    The scripts like ‘show user’ that have a % in them get loaded and invoked from other scripts that pass an argument (the user id) to them. They don’t run in isolation. Sorry the error message is misleading.

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    Are you saying that the update 0.5.3 hasn’t fixed the 0 results issue above?

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    Going to check in updated version tomorrow (and with slevit’s changes).

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    Yep, you are right. Sorry. Will try to commit fix next week. Here is a clue to temp fix

    if (isset($dcols))  // added line
          foreach($this->dview->cellFunction as $name=>$unused) // fyi - ignore orphaned cell names'
    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    It works for me on localhost and shared host. And I cut and pasted the SQL and PHP from the post above.

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    Here’s another way of doing this without creating an extra, unwanted column, SQL is:
    select id, concat('https://www.google.co.uk/images/srpr/logo11w.png',',','http://www.google.com') as link from wp_posts limit 2

    PHP is:

    $a = explode(",",$value);
    return "<a href='".$a[1]."'><img src='".$a[0]."' /></a>";

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    Sorry. Try returning one space. Or

    return "&nbsp;" ;

    Forum: Plugins
    In reply to: [dbview] Sintax problem
    Plugin Author john ackers

    (@john-ackers)

    dbview is only intended to display database data in a table. You can execute inserts, updates, and deletes but you can only execute one SQL statement in each dbview not five. Sorry.

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    Yes, someone has raised that before. My only suggestion is to use CSS to hide the column or put

    return '';

    as a PHP snippet in the top of the unwanted column which will blank the column. Put the the column in the middle of the table and make it a feature! There does need to be a clean way to suppress display columns and sorry don’t have time to implement on this at moment.

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    If you this SQL

    SELECT ID, 'https://www.google.co.uk/images/srpr/logo11w.png' AS 'image', 'http://www.google.com' as 'link' FROM wp_posts limit 2

    and this PHP snippet above the link column

    return "<a href='".$value."'><img src='".$row['image']."'./>/a>";

    you can click on the images in the 3rd column and get taken to google.

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    Ok. Are you using just SQl or SQL + php, I am not sure where we are starting from.

    Plugin Author john ackers

    (@john-ackers)

    Try dropping the semi colon.

    Forum: Plugins
    In reply to: [dbview] DB Images
    Plugin Author john ackers

    (@john-ackers)

    This usable SQL does not work for me either: `SELECT ID, ‘<img src=”https://www.google.co.uk/images/srpr/logo11w.png&#8221; />’ AS ‘ColB’
    FROM wp_posts limit 2`

    I am not sure what’s wrong. If I use chrome inspect element, your HTML is there but greyed out. I think there maybe some level of anti HTML injection going on somewhere.

    However this works, try a PHP snippet above the first column, your google image is displayed
    return "<img src=\"https://www.google.co.uk/images/srpr/logo11w.png\" />";

    This also works: try using the SQL
    SELECT ID, ‘https://www.google.co.uk/images/srpr/logo11w.png&#8217; AS ‘ColB’ FROM wp_posts limit 2
    with the PHP snippet return “<img src=’$value’ />”;

    Plugin Author john ackers

    (@john-ackers)

    I think that if you have put in your own LIMIT statement then the plugin will not append or edit your SQL statement. Try removing the LIMIT 20. There should be a warning to say that, apologies.

    Plugin Author john ackers

    (@john-ackers)

    The ajax request is correct so I think something is going wrong on the PHP/server side. To make the paging work, the SQL statement is appended with LIMIT and OFFSET parameters. If you go into tools, there is a pre-installed dbview called show all options that displays the contents of wp_options table and the results should be paginated. Does this work for you? If yes I’d try a simple SQL query and make sure the results get paginated. Or just post up your SQL statement here and I’ll take a look.

    John

Viewing 15 replies - 46 through 60 (of 150 total)