I have a couple of javascript source files that I would like to limit to include only on specific website pages. If I enable them in Code Manaager, they are included on all pages, and one of them is necessary on one page of the site, but breaks the functionality of another page.
Nothing comes to mind, without poring through both scripts to find the conflict – would be simpler to just not include the one resource file on the conflicting page… thoughts?
I really am having fun with code manager, though. I can do all sorts of things I ‘want to do’ – like adding javascript and html within a PHP shortcode, just by using the “echo” command. And I don’t have to learn all the structure of WordPress to do it!!
Thank you for this!
]]>Hello,
I have a search form in Code manager to connect with a DataAccess table. Can I fill a combobox with query in the search form, like this?
<form method="get" action="https://www.miweb/reporte-usuarios/">
<label for="wpda_search_column_Usuario">
Usuario
</label>
<select id="wpda_search_column_Usuario" name="wpda_search_column_Usuario">
<?php
$query = "SELECT * FROM users";
$result = mysql_query($query);
while($row=mysql_fetch_assoc($result)){
echo '
<option value='.$row["user_id"].'>'.$row["user_login"].'</option>
';
}?>
</select>
<br/><br/>
<label for="wpda_search_column_Activo">
Estado de Usuarios
</label>
<select id="wpda_search_column_Activo" name="wpda_search_column_Activo">
<option value="1">Activos</option>
<option value="0">Bajas</option>
</select>
<br/><br/>
<input type="submit" />
</form>
</center>
]]>
Hello, one of my sites, which uses WP Data Access and Code Manager, is currently down, with this error message:-
Error getting administrator credentials: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/vhosts/{main-url}.com/ba2.{main-url}.com/wp-content/plugins/code-manager/includes/class-code-manager-loader.php on line 12580768
The site is password-protected, but I can provide access details if you need to access the site itself. At the moment, all that I see is a blank page – no error message is shown in the web.
Thanks in advance for your help.
Nigel (RC169)
]]>Installed 6.4 on a site and received this error.
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /home/ecmca856/public_html/wp-content/plugins/code-manager/includes/class-code-manager-loader.php on line 67
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in?/home/ecmca856/public_html/wp-includes/class-wp-fatal-error-handler.php?on line?74
Renamed Code Manager Directory in File Manager and site came back up. Have other sites with Code Manager installed and pending 6.4 install. Could this be looked at please and thanks
Steve Fulton, UE
]]>When i used your shortcodes with “Post Grid Combo” Plugin (Pro), they stopped working when showing cards with the “read more” button in their grid. I build custom post grid layouts using your shortcodes.
As ive read in the ticket below mine, another user had the same problem and it started to “magically” work when he started the trial for pro.
That is not a good advertisement of your product. Instead of buying pro for your plugin i will just use one of your competitors that i bought to see if it works, even if i liked your interface better.. Please rethink this “shortcodes only work correctly in pro version” marketing strategy.
I am searching possible alternatives to my WP Code Snippets plugin. Therefore I copied some html, javascript and php shortcodes from WP Code Snippets into the Code Manager plugin but they are not working there. Elementor’s shortcode snippet do not recognize Code Manager’s shortcodes at all showing [cmruncode id=”1″] as ordinary text. I have tried also to deactivate WP Code Snippets plugin but this did not help.
What can be a course of this?
I’ve been using the code for a search form, it works well but only for exact searches.
Is it possible to set a wildcard setting?
]]>I tried creating a shortcode with the Code Manager plugin using the code below, but it crashed when I tried to run it. It is a simple repeating query just to test the concept and it works on its own (outside of WordsPress) just fine.
Is this beyond the shortcode capabilities? If not how do I fix it to make it work?
<?php require_once('https://pabirds.org/Connections/siteguide2018.php'); ?>
<?php require_once('https://pabirds.org/webassist/mysqli/rsobj.php'); ?>
<?php
$Recordset1 = new WA_MySQLi_RS("Recordset1",$siteguide2018,0);
$Recordset1->setQuery("SELECT * FROM publications");
$Recordset1->execute();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<div>
<p>Test PHP/SQL</p>
<p> </p>
</div>
<p> </p>
<?php
$wa_startindex = 0;
while(!$Recordset1->atEnd()) {
$wa_startindex = $Recordset1->Index;
?>
<div>
<p><?php echo($Recordset1->getColumnVal("PubFileName")); ?></p>
</div>
<?php
$Recordset1->moveNext();
}
$Recordset1->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</body>
</html>
]]>
Hello Peter,
Just a little inconvenience. A lot of the time when I open Code manager I have to select “PHP Short Code”. The page then goes away and reloads. Then I choose to sort by Name. This sort by Name I click on every time I link to the list.
Would it be possible to have some kind of default list parameters? When I am working on code very often I go back and forth between active code and code I am working on and the constant refresh of my list view becomes tedious.
I have tried to do a CTRL click on the Back to list button to try to create a second tab but that does not seem to work. I do not get a second window.
Just a suggestion, to make me more efficient.
BTW, I love your plugins. Yesterday I tried chatGPT for the first time on random questions, questions about code and even inserted code into it to have it describe the code for me. Very impressive.
Ga?tan
]]>I’m using the publication search form in code manager and I’m looking for a way to hide the search parameters in the url. is this possible?
]]>I use a simple php code to parse a php file (epg.php). It works properly (now live working) echoing a div with echo return, between other divs.
I’m trying to modify the code just in case epg.php can’t be downloaded.
(@include(“epg.php”)) or die(“<span class=\”sonando\”>” . “Directo” . “</span>”);
When I delete epg.php for testing, this div is returned, but it doesn’t load the rest of wordpress page.
I don’t know why when answer is the same when exists and doesn’t only changing innertext in div, when it doesn’t, the return is ok, but not the resto of page.
Wondering Probably is not plugin issue…
Anyway, can you help me?
Thnks in advance
]]>I really am not sure what I am doing. I know enough coding to get myself in trouble.
What I am trying to do is create a page that my users can go to and print off a PDF that is filled out with a lot of data from a Mysql Database. I am having a problem writing the code in the code manager though and I want to know if I am missing something, or if I am trying to do something with this that it is not meant to do.
(In the end it should look something like this: https://content.instructables.com/ORIG/F32/Y0FV/J8F5Q3W5/F32Y0FVJ8F5Q3W5.png?auto=webp&frame=1&width=1024&height=1024&fit=bounds&md=5a45ebe2850f9ab8d04792009d63d6a5)
Specifically, you will notice that I have to put “\” in the code at places where is normally should not go. why this is working, I have no clue. I assume I am confusing the system into doing what I want it to do. I have no clue if this is the correct way to achieve what I am looking for or not.
Here is a copy of my code with some info scrubbed.
<?php
$servername = “Removed”;
$username = “Removed”;
$password = “Removed”;
$dbname = “Removed”;
$current_user = wp_get_current_user();
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
//$sql = “SELECT * FROM LARP_Characters WHERE Username = ‘”.$current_user->user_login.”‘”;
//$sql = “SELECT * FROM LARP_Characters”;
$sql = “SELECT * FROM LARP_Characters WHERE Status = ‘Active’ ORDER BY ‘Name'”;
$result = $conn->query($sql);
if ($result->num_rows > 0) {
echo “<form>”;
echo “Choose a Character: “;
echo “<select name=’Character_Name’>”;
// output data of each row
while($row = $result->fetch_assoc()) {
$selected = ($row[‘Character_Name’] == $_GET[‘Character_Name’]) ? “selected” : “”;
echo “<option value='”.$row[‘Character_Name’].”‘ $selected>”.$row[‘Character_Name’].”</option>”;
}
echo “</select><br>”;
echo “<br /><input type=’submit’ value=’Load Character Sheet’><br><br>”;
echo “</form>”;
} else {
echo “0 results ; $sql ; “.json_encode($current_user);
}
if ($_GET[‘Character_Name’]) {
//echo $_GET[‘Character_Name’];
//$sql = “SELECT * FROM LARP_Characters WHERE Character_Name = ‘”.$_GET[‘Character_Name’].”‘”;
//$sql = “SELECT * FROM LARP_Characters WHERE Username = ‘”.$current_user->user_login.”‘ AND Character_Name = ‘”.$_GET[‘Character_Name’].”‘”;
//$sql = “SELECT * FROM LARP_Characters WHERE Approved = ‘Yes'”;
$sql = “SELECT * FROM LARP_Characters WHERE Status = ‘Active’ ORDER BY ‘Name’ ASC”;
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
//echo “<div class=\”character-sheet\”><div style=\”overflow-x:auto\”>
echo “<div class=\”character-sheet\”><div style=\”page-break-before:always ; margin: 0 auto ; width:100% ; \”>
<table border=\”0\”>
<tbody>
<tr>
<td colspan=\”1\”>Player: </td>
<td colspan=\”3\”>” . $row[“Name”]. “</td>
<td colspan=\”1\”>Name: </td>
<td colspan=\”3\”>” . $row[“Character_Name”]. “</td>
</tr>
<tr>
<td colspan=\”4\”>Occupation: ” . $row[“Occupation”]. ” – ” . $row[“Monthly_Gain”]. “</td>
<td colspan=\”2\”>Mortality? </td>
<td colspan=\”2\”>” . $row[“Mortality”]. ” – ” . $row[“Mortality_Rating”]. “</td>
</tr>
<tr>
<td colspan=\”2\”><div style=\”text-align:center\”>Currency</div></td>
<td colspan=\”1\”><div style=\”text-align:right\”>Copper Pieces: </div></td>
<td colspan=\”1\”>” . $row[“CP”]. “</td>
<td colspan=\”1\”><div style=\”text-align:right\”>Silver Pieces: </div></td>
<td colspan=\”1\”>” . $row[“SP”]. “</td>
<td colspan=\”1\”><div style=\”text-align:right\”>Gold Pieces: </div></td>
<td colspan=\”1\”>” . $row[“GP”]. “</td>
</tr>
<tr>
<td colspan=\”1\”><div style=\”text-align:right\”>Ammo: </div></td>
<td colspan=\”1\”>” . $row[“Ammo”]. “</td>
<td colspan=\”1\”><div style=\”text-align:right\”>Arrows: </div></td>
<td colspan=\”1\”>” . $row[“Arrows”]. “</td>
<td colspan=\”1\”><div style=\”text-align:right\”>Locks: </div></td>
<td colspan=\”1\”>” . $row[“Locks”]. “</td>
<td colspan=\”1\”><div style=\”text-align:right\”>Ailment: </div></td>
<td colspan=\”1\”>” . $row[“Ailments”]. “</td>
</tr>
<tr>
<td colspan=\”2\”><div style=\”text-align:right\”>Other Possessions: </div></td>
<td colspan=\”6\”>” . $row[“Other_Items”]. “</td>
</tr>
</tr>
<td colspan=\”8\”>
<table border=\”1\” width=\”100%\”>
<tbody>
<tr>
<td></td>
<td><div style=\”font-weight: bold\”>Animal</div></td>
<td><div style=\”font-weight: bold\”>Chemical</div></td>
<td><div style=\”font-weight: bold\”>Plant</div></td>
<td><div style=\”font-weight: bold\”>Ore</div></td>
<td><div style=\”font-weight: bold\”>Stone</div></td>
<td><div style=\”font-weight: bold\”>Magic</div></td>
<td><div style=\”font-weight: bold\”>Technology</div></td>
</tr>
<tr>
<td><div style=\”font-weight: bold\”>Common</div></td>
<td>” . $row[“Common_Animal”]. ” </td>
<td>” . $row[“Common_Chemical”]. ” </td>
<td>” . $row[“Common_Plant”]. ” </td>
<td>” . $row[“Common_Ore”]. ” </td>
<td>” . $row[“Common_Stone”]. ” </td>
<td>” . $row[“Common_Magic”]. ” </td>
<td>” . $row[“Common_Technology”]. ” </td>
</tr>
<tr>
<td><div style=\”font-weight: bold\”>Scarce</div></td>
<td>” . $row[“Scarce_Animal”]. ” </td>
<td>” . $row[“Scarce_Chemical”]. ” </td>
<td>” . $row[“Scarce_Plant”]. ” </td>
<td>” . $row[“Scarce_Ore”]. ” </td>
<td>” . $row[“Scarce_Stone”]. ” </td>
<td>” . $row[“Scarce_Magic”]. ” </td>
<td>” . $row[“Scarce_Technology”]. ” </td>
</tr>
<tr>
<td><div style=\”font-weight: bold\”>Rare</div></td>
<td>” . $row[“Rare_Animal”]. ” </td>
<td>” . $row[“Rare_Chemical”]. ” </td>
<td>” . $row[“Rare_Plant”]. ” </td>
<td>” . $row[“Rare_Ore”]. ” </td>
<td>” . $row[“Rare_Stone”]. ” </td>
<td>” . $row[“Rare_Magic”]. ” </td>
<td>” . $row[“Rare_Technology”]. ” </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan=\”8\”>
____________________________________________________________________________________________________________________________________________________
</td>
</tr>
<tr>
<td colspan=\”8\”>
<table border=\”1\” width=\”100%\”>
<tbody>
<tr>
<td colspan=\”8\”><div style=\”text-align:Center\”>Abilities</div></td>
</tr>
<tr>
<td>Background Ability: </td>
<td colspan=\”7\”>” . $row[“BGA”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“BGA_Notes”]. “</td>
</tr>
<tr>
<td>Ability 1: </td>
<td colspan=\”7\”>” . $row[“A1”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A1_Notes”]. “</td>
</tr>
<tr>
<td>Ability 2: </td>
<td colspan=\”7\”>” . $row[“A2”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A2_Notes”]. “</td>
</tr>
<tr>
<td>Ability 3: </td>
<td colspan=\”7\”>” . $row[“A3”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A3_Notes”]. “</td>
</tr>
<tr>
<td>Ability 4: </td>
<td colspan=\”7\”>” . $row[“A4”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A4_Notes”]. “</td>
</tr>
<tr>
<td>Ability 5: </td>
<td colspan=\”7\”>” . $row[“A5”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A5_Notes”]. “</td>
</tr>
<tr>
<td>Ability 6: </td>
<td colspan=\”7\”>” . $row[“A6”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A6_Notes”]. “</td>
</tr>
<tr>
<td>Ability 7: </td>
<td colspan=\”7\”>” . $row[“A7”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A7_Notes”]. “</td>
</tr>
<tr>
<td>Ability 8: </td>
<td colspan=\”7\”>” . $row[“A8”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A8_Notes”]. “</td>
</tr>
<tr>
<td>Ability 9: </td>
<td colspan=\”7\”>” . $row[“A9”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A9_Notes”]. “</td>
</tr>
<tr>
<td>Ability 10: </td>
<td colspan=\”7\”>” . $row[“A10”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>Upgrades: ” . $row[“A10_Notes”]. “</td>
</tr>
</tbody>
</table>
</td>
</tbody>
</table></div></div>
<br> <br>
<div class=\”character-sheet\”><div style=\”page-break-before:always ; margin: 0 auto ; width:100% ; \”>
<table border=\”5\” width=\”100%\”>
<tbody>
<tr>
<td colspan=\”8\”>
<div style=\”background-color: lightgrey; text-align: Center;\”>Known Recipies</div>
</td>
</tr>
<tr>
<td colspan=\”8\”>
<div style=\”background-color: lightgrey; text-align: Center;\”>Recipes You Have Learned</div>
</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP1”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP2”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP3”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP4”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP5”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP6”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP7”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP8”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP9”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP10”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP11”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP12”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP13”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP14”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP15”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP16”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP17”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP18”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP19”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>” . $row[“RP20”]. “</td>
</tr>
<tr>
<td colspan=\”8\”>
<div style=\”background-color: lightgrey; text-align: Center;\”>End of Event Check-In</div>
</td>
</tr>
<tr>
<td colspan=\”1\”>
<div style=\”background-color: lightgrey; text-align: right;\”>Refered By:</div>
</td>
<td colspan=\”3\”>________________________________________</td>
<td colspan=\”1\”>
<div style=\”background-color: lightgrey; text-align: right;\”>Event Name:</div>
</td>
<td colspan=\”3\”>_________________________________________________________</td>
</tr>
<tr>
<td colspan=\”2\”>
<div style=\”background-color: lightgrey; text-align: right;\”>Event Number<br></div>
</td>
<td colspan=\”2\”>
<div>#1 <input type=\”checkbox\”> | #2 <input type=\”checkbox\”> | #3+ <input type=\”checkbox\”></div>
</td>
<td colspan=\”1\”>
<div style=\”background-color: lightgrey; text-align: right;\”>Date:</div>
</td>
<td colspan=\”3\”>_________________________________________________________</td>
</tr>
<tr>
<td colspan=\”1\”>
<div style=\”background-color: lightgrey; text-align: Right;\”>Mortality<br></div>
</td>
<td colspan=\”1\”>__________</td>
<td colspan=\”1\”>Unlearned Recipies</td>
<td colspan=\”5\”>__________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Copper<br></div>
</td>
<td>__________</td>
<td colspan=\”1\”>Artifacts</td>
<td colspan=\”5\”>__________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Silver<br></div>
</td>
<td>__________</td>
<td colspan=\”6\”>___________________________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Gold<br></div>
</td>
<td>__________</td>
<td colspan=\”1\”>Crafted Itmes</td>
<td colspan=\”5\”>__________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Arrows<br></div>
</td>
<td>__________</td>
<td colspan=\”6\”>___________________________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Ammo<br></div>
</td>
<td>__________</td>
<td colspan=\”1\”>Other Items</td>
<td colspan=\”5\”>__________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Locks<br></div>
</td>
<td>__________</td>
<td colspan=\”6\”>___________________________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Ailment<br></div>
</td>
<td>__________</td>
<td colspan=\”1\”>Abilities Trained</td>
<td colspan=\”5\”>__________________________________________________________________________________________________</td>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: right;\”>Ailment Lvl</div>
</td>
<td>__________</td>
<td colspan=\”1\”>CSP (GM Only)</td>
<td colspan=\”5\”>__________________________________________________________________________________________________</td>
</tr>
<tr>
<td> </td>
<td>
<div style=\”background-color: lightgrey; text-align: Center;\”>Animal</div>
</td>
<td>
<div style=\”background-color: lightgrey; text-align: Center;\”>Chemical</div>
</td>
<td>
<div style=\”background-color: lightgrey; text-align: Center;\”>Plant</div>
</td>
<td>
<div style=\”background-color: lightgrey; text-align: Center;\”>Ore</div>
</td>
<td>
<div style=\”background-color: lightgrey; text-align: Center;\”>Stone</div>
</td>
<td>
<div style=\”background-color: lightgrey; text-align: Center;\”>Magic</div>
</td>
<td>
<div style=\”background-color: lightgrey; text-align: Center;\”>Technology</div>
</td>
</tr>
<tr border=\”5px\”>
<td>
<div style=\”background-color: lightgrey; text-align: Right;\”>Common<br></div>
</td>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: Right;\”>Scarce<br></div>
</td>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: Right;\”>Rare<br></div>
</td>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
<td><div style=\”text-align: Center;\”>__________</td></div>
</tr>
<tr>
<td>
<div style=\”background-color: lightgrey; text-align: Right;\”>Quest Mats:</div>
</td>
<td colspan=\”7\”>____________________________________________________________________________________________________________________________________
</td>
</tr>
</tbody>
</table></div></div>
<br> <br>
“;
}
} else {
echo “Unable to Load Character Details”;
}
}
$conn->close();
?>`
`
If anyone is able to tell me an easier or better way to do what I am trying to do, please share it with me.
]]>Hi there, I’m wondering where snippets are stored – in the database or in individual php files? I require php files so that I can easily debug them with Xdebug.
]]>Hey
I would like to give feedback and find it much easier doing so on Github to where I can easier include images etc.
Do you have a Github repo I can add issues to?
If it is private can you add my e-mail to it?
[email protected]
Thanks.
]]>Code Manager shows and allows 57 lines of PHP code for editing. I entered a new php shortcode with 159 lines of php and it looks like 102 lines of php have vanished.
If we cannot enter, save, and edit large php lines of code for shortcodes, we could not use this plugin and would need a refund.
I have a piece of PHP code working fine and dandy but I need to pass an array to JS code for the next step.
If I put a script code at the end of the PHP code I can get the array passed to that JS script but it does not pass if that script is a Code Manager LS piece of code.
Here’s the array passing script. I use script tags after the ?> in the PHP piece of code but not in the JS piece of code.
<script>
var passArray = <?php echo '["' . implode('", "', $php_array) . '"]' ?>;
document.write(passedArray[0]);
</script>
Thanks.
]]>after I added a new snippet, why did the existing code file disappear, please help how can I restore it to the way it was
]]>Is it possible to use a PHP variable created in a Code Manager snippet in a WordPress page?
e.g. <audio controls><source src=”$Audio”></audio>
Where $Audio is a link scraped in the PHP snippet.
Thanks.
]]>Hi Peter,
for my WPDA project I need the users to be notified by the system, depending on my custom table values (kind of threshold warning), similarly to the standard WP Data Access “Successfully saved to the Database” message, or “somewhere” in the User WP home page..
I’m planning to use DB Triggers/procedures on the back-end (threshold check), but I miss the way to show the “message string” on my related WPDA project-page.
Thanks in advance for any suggestion.
]]>Hello,
I use the free versionof WP Data Access. I want to change the style of a Data project (2 tables parent/child) with Code Manager. I put the following code on a web page:
[cmruncode name="WP-Data-Access-Data-Projects-Web-Admin"]
[cmruncode id="8"]
[cmruncode name="WP-Data-Access-Data-Publisher-Rounded-Corners-Wide"]
[cmruncode name="Hello World"]
[wpdadiehard project_id="1" page_id="1"]
>> No change in page style.
However with the Data publisher (One table) it works :
[cmruncode name="WP-Data-Access-Data-Projects-Web-Admin"]
[cmruncode id="4"]
[cmruncode id="7"]
[cmruncode name="Hello World"]
[wpdataaccess pub_id="5"]
Restriction of free version? Bug ?
Any modification, solution ?
Thanks
A. Philippe
]]>I host my WordPress site on a Synology NAS. I upgraded the firmware/OS to DSM 7 and it reconfigured web server settings, moving files to a new folder. I mention this in case it’s related.
Now, if I use the Code Manager publication styles, I get the following error on my pages:
Parse error: syntax error, unexpected end of file in /volume1/web_packages/wordpress/wp-content/plugins/code-manager/Code_Manager/Code_Manager.php(175) : eval()’d code on line 20
I reinstalled Code Manager and reimported the styles, without success. For now, I’ve just disabled Code Execution. The WP Data Access pages are functional, I just can’t stylize them.
]]>I’ve been using the plugin fine on this project.
Have created multiple JS snippets of code but now, when I try to create a new piece of code, using tab mode, when I get the message “Change code type?” and click “Yes” nothing happens. The Change code type? lightbox stays visible but nothing else.
I can create new JS snippets in list mode.
]]>I am trying to use dat-fns with Code Manager.
I have a working JS Fiddle
But when I try to transfer it does not work.
I have a link to date_fns.min.js in the header and the following in Code Manager:
var id1 = document.getElementById("id1")
id1.innerHTML = dateFns.startOfQuarter(new Date())
id2.innerHTML = dateFns.endOfQuarter(new Date())
And ideas would be great, thanks.
]]>How is the security handled for the code snippets.
Is my code safe for injections ?
There seems to be a couple of small problems.
When I want to duplicate code I do the following:
1. I open the code to be duplicated;
2. I do Ctrl-A, Ctrl-C;
3. I open the new tab;
4. I do Ctrl-A, Ctrl-V;
a) there seems to be a small problem here, not all the code appears, there is a blank area at the top. When I click in that blank area the code appears.
5. I save the code;
6. I rename the tab and save again.
7. I make a small change to the code and save again.
a) at this point funny stuff happens
– I get a message “Code or name already exists”
– The name I had used disappears and New comes back as the name of the tab
– I rename it again to something else and save. That seems to work.
8. I close down Code manager and open it again
a) the last renamed file is there
b) the originally renamed file has disappeared.
I have a video of this whole process which I can send to you if you want.
gaetan
I can’t understand how this can even happen: I copy the PHP from a working shortcode, past into new shortcode. The original shortcode works, the new shortcode does not.
any thoughts?
]]>The link to page links to a fiddle that works but, when I put it into WordPress it does not.
To put into WordPress I copy/pasted the Javascript part of the fiddle into a Code Manager JS file and put that shortcode at the top of the page then copy/pasted the HTML from fiddle after that.
I also put the script in the header of the theme with no luck.
]]>Hello Peter,
I created a new blank HTML page purely for testing purposes and keeping it simple.
I have a view that I have used successfully as a Data Publication WP Data Access Premium. I wanted to custom style the results so installed Code Manager after I saw some response and code in the WPDA support forum. I tried that code first without success.
$wpdadb = WPDADB::get_db_connection( ‘rdb:my_db’ );
$rows = $wpdadb->get_results( ‘select * from my_view‘, ARRAY_A);
The code example mentioned above is a little different from the example in the PHP code library example, but I figured I would try the library code next…
<?php
$wpdadb = WPDataAccess\Connection\WPDADB::get_db_connection( ‘rdb:my_db’ );
$rows = $wpdadb->get_results( ‘select * from my_view‘ );
var_dump($rows);
?>
This did not return results either. Steps I have taken:
1) Verified names of db and view (several times)
2) Checked settings in both WPDA and CM (several times)
3) Tested ‘Hello World’ PHP shortcode successfully to verify shortcodes and CM are working
Is there something obviously incorrect in what I have above? If not, do you have an example of code I could put in to confirm that the connection was made, or can you suggest a next step in debugging this? Thank you and very much appreciated.
]]>Would it be possible to use the code type somehow to filter the list produced with Open existing code.
As it is, it is easier for me to use the filtered list to find the code I want to edit.
Perhaps you could add an edit to your bulk actions in the list mode to open multiple editors?
Your query manager in data access allows multiple editors automatically, you just need to open them sequentially. I have used that productively.
Thanks again for all your work.
Gg
Hi All,
I am trying to use code-manager’s hooks such as ‘wpda_before_list_table’ in my environment.
I am finding that the callback are not getting invoked and I am not sure why.
What I found is that my simple php code runs, but not the callbacks.
I have couple of thoughts, but was not sure:
1. My code-manager list view does not say code-manager premium? Do I need premium to have this functionality? I am on a local machine, if that makes any difference.
2. I have setup WordPress using ‘localwp’ It allows me to easily setup multiply WordPress sites locally and give me access to each site with https://<site-name>.local I don’t access the site with localhost or 127.0.0.1. Not sure if that has any impact?
Any help would be greatly appreciate it.
Thanks,
<?php
wp_get_current_user();
$current_user_id = wp_get_current_user();
echo "Current User ID: " . $current_user_id->user_login;
function addhello( $self ) {
echo 'Hiiii!!!!';
}
add_action( 'wpda_before_simple_form', 'addhello', 10, 1);
add_action( 'wpda_after_simple_form', 'addhello', 10, 1);
add_action( 'wpda_before_list_table', 'addhello', 10, 1);
add_action( 'wpda_after_list_table', 'addhello', 10, 1);
?>
]]>