john ackers
Forum Replies Created
-
Forum: Plugins
In reply to: [dbview] External Links to Open in New WindowOK. This PHP snippet works for me:
return empty($value) ? "" : "<a href='".$value."' target='_blank' >open on Amazon</a>";
Forum: Plugins
In reply to: [dbview] How to hide the report page headerSorry the header cannot be switched off but will try to add this in future version. But you should be able to suppress display of the header using CSS.
Forum: Plugins
In reply to: [dbview] External Links to Open in New WindowOn your website, it looks like you have quotes around the the string in the ‘Amazon’ column, so the HTML is not being processed by the browser as such.
What database field(s) do you have in the database? Link, image or a string of HTML? Do you want the clickable link to contain text or an image? Let me know and I’ll give you the SQL and PHP code.
This section in the FAQ ‘How can i show images in a table column and make them clickable links?’ might help.
Use the “target” attribute to force browser to open a new window.
Forum: Plugins
In reply to: [dbview] Search functionIn this post someone else has added form elements to support a search feature. Is this what you are looking for? I will be merging that into the plugin but haven’t found the time.
Forum: Plugins
In reply to: [dbview] show single result without table?If I understand this, you want show a result of a query that returns just a single row and that that row should not be presented in a table.
I think you can force the output to be CSV or tab separated, non tabular output. The latter would probably work for you.
There’s no explicit support for sidebars. But I think you could call the plugin using PHP.
Sorry this is an incomplete answer.
Forum: Plugins
In reply to: [dbview] Interaction with Form Elements addedGot your email and thanks for testing!
Forum: Plugins
In reply to: [dbview] Interaction with Form Elements addedHi maiersoft, thanks for making what is clearly a popular addition! I am happy to merge your changes into the plugin but probably it won’t be until late next week. I should be able to do something about the limited arguments as well.
Forum: Plugins
In reply to: [dbview] Sortable columns don't work for meThe plugin doesn’t store the column sortable settings. You simply specify which column is used to initially sort the table when invoking the short code. I could add that if it’s needed but it’s not giving any extra functionality. Or am I missing something? Looking at your other post, this may not still be an issue.
Forum: Plugins
In reply to: [dbview] Linking tables together to show related recordsI haven’t tried doing this but I’d suggest creating the new page with the two or more views that you want. In the position of the two views you’d want to add some PHP that will read and parse the QUERY_STRING and extract the arguments for example using parse_str, then call dbview with those arguments, in your case the group_id. You could use do_shortcode to call dbview.
If you don’t want to put bits of PHP in your page, you could another plugin like post snippets.
So using a modified version of one of your examples, the link would be
<a href="xxx?group_id=bedford+dramatic+club">Bedford Dramatic Club</a>
Hope this helps.Forum: Plugins
In reply to: [dbview] UNIONsMy email address is in the header of DBView.class.php. It’s obfuscated to prevent spamming.
Forum: Plugins
In reply to: [dbview] UNIONsThanks for clarification. I have just tried
select * from wp_posts where id < 90 union select * from wp_posts where id > 92
…which works fine. Your apache error 406 looks very specific; I would look on the apache log file. Does your SQL statement run at the SQL command prompt (outside wordpress) ? Can you give an SQL statement that fails that I can try? thanks
Forum: Plugins
In reply to: [dbview] Open Links in New windowUsing the SQL:
select concat('https://www.google.co.uk/images/srpr/logo11w.png',',','https://www.google.com') as link
and the attribute target=’_blank’ in the PHP snippet below opens the page link https://www.google.com in a new window.
$a = explode(",",$value); return "<a target='_blank' href='".$a[1]."'><img src='".$a[0]."' /></a>";
Perhaps this is what you want to do?
Forum: Plugins
In reply to: [dbview] Open Links in New windowNot sure what you are doing above but I’m guessing that when you are opening ‘the link in the same window’ you are just replacing one dbview with another dbview (or the same dbview with different arguments) on the same page (as described in the FAQ under “How do I load a second table from a link in the first table?”).
I am not sure whether you want to load the same dbview alone in a new window or you want to load the same wordpress page again in a new window but with a different dbview. Both are tricky because to open a new window you need to use a normal wordpress page URL. If you can open the window you want by typing in a URL, you can link to it! Hope this helps.
Forum: Plugins
In reply to: [dbview] Linking tables together to show related recordsYou should be able to do that. But I cannot see your tables. I get a second authorization dialogue box after entering the password.
Forum: Plugins
In reply to: [dbview] UNIONsDo you mean a single query that includes a union? Does the SQL run at the SQL command prompt?