chrisbeck
Forum Replies Created
-
Forum: Plugins
In reply to: [Conditional Menus] Not all pages displayingIf you could check with your developer about inserting the data manually. It is likely actually easier than disabling all of the plugins. Plus, if it is a conflict with another plugin, we don’t necessarily want to delete that plugin long term. Really, I just need to know what database table to look in. I know where the menu ID is assigned and where the navigation links on the menu are assigned. I just can’t seem to find where the information on which menu to use with which page is stored.
Forum: Plugins
In reply to: [Conditional Menus] Not all pages displayingI could try that, but we have lots of active plugins that are used on the site. Is there a workaround? Where is the association between a particular post (page) and menu stored? Is it in a particular database table such that if I knew the post ID and the menu ID, I could insert these in the database table manually?
Forum: Plugins
In reply to: [Conditional Menus] Not all pages displayingAlex,
I should have been clearer in my original post. The files are stored as longblobs in a MySQL database. They aren’t residing on the server.The php script that I have used in the past retrieves the file using a query and then echoes it. The thing that is confusing is that it works fine outside of the WP context but returns a corrupted pdf in the WP context.
Thanks,
ChrisAlex,
Here is the code.$sql = “SELECT uploaded_file, uploaded_file_name FROM v36 WHERE chapter = $chapter”;
$result = @mysql_query($sql);
$data = @mysql_result($result, 0, “uploaded_file”);
$name = @mysql_result($result, 0, “uploaded_file_name”);
$filename=$name.”.pdf”;header(“Content-type: application/pdf”);
header(“Content-Description: PHP Generated Data”);
header(“Content-Disposition: inline; filename=”.$filename);echo $data;
I have tried alternative code with mysqli and mysqli_fetch_assoc(). I have tried changing headers as well. If I use the code in a normal php page, it runs fine, but if I embed it within a WP page, it tries to download the pdf, but the pdf is corrupted.
Thanks,
Chris