You are not logged in.
Perfect! Once again thank you guys!!
Is it possible to access $bigtree["config"] variables in a custom class. To test I wrote a function that is just supposed to return $bigtree["config"]["js"]["minify"] but it doesn't work. Is there any way to access these variables through a class function or some other method?
Thanks
It all works great now!
Thanks again for your continued help on this.
This fix did work for instances with a text box and a subtype of "Name". However, it doesn't appear to be working with the Array of Items field type. I set up one for my form and the form will submit fine if I don't add any items and leave it blank. If I add any number of items then I get that same original error message and it won't let me submit.
Ok, I was just wondering. Thanks for the quick response!
Just a quick question. Is it possible to have a specific module store it's information in a different database than the one used by the rest of BigTree?
Thanks
That worked perfect!
Thank you!
I'm having a little trouble creating a custom form field type which will be a list of checkboxes that a user can select and then all the selected values are stored as a single comma delimited string. I'm drawing it the same way the list form field is drawn, except that I removed the select and option tags and replaced them with a checkbox input. This correctly draws what I want. The problem I'm having is that on the process, only the last checked value is being stored. I can't figure out why this is since all of the checkbox inputs have the same name and when I check a box the input does have the checked="checked" added to it. I have printed the $_POST variable right after I hit the submit button but it also only shows the last checked value. Is there a way to get all the checked values to appear similar to how a regular checkbox would behave?
Thanks
Would it be possible to add an option that combines both the list and checkbox features that allows users to select multiple checkboxes from a defined list? These selections then get saved as one field that's comma (or whatever) delimited. In my particular case I'm setting up a module where users assign content to categories and they need to be able to choose more than one and at the moment there isn't a great way to implement that other than each category getting it's own checkbox resource and using a callback function.
Thanks
I just setup my first embeddable form module and I'm getting an error every time I try to submit it. I think I've figured out what the problem is but I'm not sure how to fix it. The problem appears to be in the if ($_POST["_bigtree_hashcash"] != md5($complete_string) test in /core/admin/ajax/auto-modules/embeddable-form/process.php This test fails on each submission resulting in the error message "The form submission failed to pass our automated submission test. If you have JavaScript turned off, please turn it on." I looked in some other files and I found the input that it is comparing the hash value of, _bigtree_hashcash. I think that the problem is that there is no value being placed in this input on the initial load, only a name and id are defined for it. I tried placing <?=$bigtree["form"]["hash"]?> as the value, which is the same hash value used in the URL for the form action but that did not work. Is there another value that needs to be placed in that input or am I just entirely off base?
Thanks
When I setup an array of items where one of them had an html editor in it, when I would go to edit that item the TinyMCE4 html editor would not appear. It would appear if I was adding an item but not if I was editing one. I believe the problem resides in core/admin/js/main.js within the BigTreeArrayOfItems class and then under editItem there needs to be the same check based on the if (tinyMCE.majorVersion == 4) found in addItem. When editing an item it is only set to call the TinyMCE3 initialize which causes a problem if you are set to TinyMCE4. Once I copied that if to the edit item section everything worked fine.
Thanks
That makes sense.
Thanks for your help.
Is there a reason that the following recursive function generates an error when being implemented in my BigTreeCustom class? Other functions in this class work fine and it seems like this function works until the recursive call. I also tried writing another recursive function and received the same error. Is there something BigTree does to prevent this?
function recursive($number) {
echo $number;
$number = $number - 1;
if($number > 0):
recursive($number);
else:
echo "Finished";
endif;
}The error returned is Fatal error: Call to undefined function recursive() in \custom\admin\class_extensions\BigTree.php on line 118 (which references the recursive call inside the if statement).
Thanks
Thought I'd share this, if anyone ever runs across the 403 Forbidden Access problem because they create a folder that shares the same name as a page route then this should fix it. Essentially, it parses out the URL and then queries BigTree and loads your template content. This would be the index.php file for the offending folder, paths may need to be adjusted to reflect placement in folder hierarchy.
<?
$serverRoot = str_replace("site\\","",__FILE__);
$serverRoot = strtolower($serverRoot);
$filePath = str_replace("/", "\\", $_SERVER['PHP_SELF']);
$filePath = strtolower($filePath);
$folderPath = str_replace("\index.php", "", $filePath);
$folderPath = ltrim($folderPath, "\\");
$serverRoot = str_replace($filePath, "", $serverRoot);
include $serverRoot."/templates/config.php";
include $serverRoot."/core/bootstrap.php";
$pageInfo = sqlfetch(sqlquery("SELECT resources, id, parent, nav_title, meta_keywords, meta_description, template FROM bigtree_pages WHERE path = '".$folderPath."'"));
$BigTreeCMSClass = new BigTreeCMS();
$bigtree["resources"] = $BigTreeCMSClass->decodeResources($pageInfo["resources"]);
$bigtree["page"]["title"] = $pageInfo["nav_title"];
$bigtree["page"]["id"] = $pageInfo["id"];
$bigtree["page"]["nav_title"] = $pageInfo["nav_title"];
$bigtree["page"]["callouts"] = $bigtree["resources"]["callouts"];
$bigtree["page"]["meta_description"] = $pageInfo["meta_description"];
$bigtree["page"]["meta_keywords"] = $pageInfo["meta_keywords"];
$calloutIncludePath = "../../templates/callouts/";
require '../../templates/layouts/' . $pageInfo["template"] . '.php';
?>That makes sense, I don't think I ever would have thought of that without your help.
Thanks!
Just the standard process. So the table is already created and setup in my database when I start. And I've always done it that way.
It happens anytime I create a new module, all of the ones I currently have work fine. When I made a new one I was using the homepage_features table and what would happen is that I would click "Add Module", name it and everything and assign homepage_features as the related table. Then, I clicked "Continue" to edit the view where I change the type to "Draggable List" but other than that I don't change anything. Then, I click "Add Form" and set that up with an image upload, a list, and some text boxes. Then I go in through the Modules tab to add a new "Featured Content". After I click "Save & Publish" everything appears to have worked fine, the popup tells me it was saved, it appears in the view, and it appears in the database. However, when I click the "Edit" icon it takes me to the edit form and all of the fields are blank so I can't edit the information anymore. Then, if I go back to the view and try to add a new "Featured Content", I have the same success through the whole process except when I click "Save & Publish" I go back to the view and that new entry is not there and does not appear in the database.
Are you wanting the whole database or just the bigtree_module_* tables and the ones I created?
I'm running BigTree 4.1.1 and have run into a strange problem recently when creating Modules (it also happened when using BigTree 4.1). I've made several in the past without any issues but now when I create one, I go in and add my first entry and it says it was added with no errors, but if I go back in to edit it all of the fields are blank and no data is present. When I look in my database the data is there and in the right spot so I'm not sure why it's not pulling it into the edit form. Also, after I add the first entry, if I try to add anymore it will say they were added without any errors but they do not appear in my View or in the database. Not sure what might be causing this, any thoughts are appreciated.
Thanks
Ok, I think I have at least figured out what the problem is. We have other files like forms and pdf documents and other things on our old site that we are moving to this new server. In doing so we have to recreate the folder structure so all of our links will still work. Meaning that I have a page in bigtree with a URL /career and then I have to make a folder inside my site folder called career and then put some files in that. It's in these cases that I'm getting the 403. I'm assuming this is because my server is looking for an index.php file in these folders and not finding one. Am I just going to have to create redirects somehow or are there rewrite rules to get around this or is not possible for me to have a /career page in BigTree and a career folder within my site folder?
I've created about 60-70 top level pages in BigTree and it looked like everything was going smoothly but now there are certain pages (4 so far) that when I browse to them I'm getting a 403 Forbidden Access. I know that some of these pages worked in the past and now do not. I have not changed any URL Rewrite settings in IIS or any other settings. I was wondering if this was a known issue or if someone else had some success when they encountered it?
Some of the URLs that don't work: /web /career /counseling
Thanks
Finally solved it. In case anyone else tries this in the future, I had to remove carriage return characters from my old database string as well as escape the other characters. Carriage Return: and Horizontal Tab: 	
Yeah with the missing </p> that was because I had trimmed off the string when I pasted it into my post because it was rather long.
One thing I did just discover was that I wasn't escaping double quote marks. Now, I am replacing all " with \" but still not having any luck. I checked on the template and it is set to content the same as the other BigTree pages. I'll continue to mess with different things and just keep trying but I did want to ask if you could think of any other characters I would need to escape besides double quotes?
Thanks
We are setting up a new site in BigTree and having to import all of our old content from an old database. I have setup a script that currently takes the HTML code from our old database and escapes the forward slashes with backslahses (ie <\/span>) and removes any <br /> tag and replaces it with \r\n. I then recreate the string that exists in my resources column in bigtree_pages for my content template.
So the string that is placed in there by BigTree when I create a new page through the CMS looks like this:
'{"featured_image":"{staticroot}files\/pages\/contentimage-2.jpg","page_header":"Biology Course Descriptions","page_content":"<h2>Biology Course Descriptions<\/h2>\r\n","callouts":[]}'
And the string that I insert from my old database after the modifications looks like this:
'{"featured_image":"{staticroot}files\/pages\/contentimage-2.jpg","page_header":"Phillip Stepp","page_content":"<p><strong>Office: <\/strong>Trustee Science Center, Room 102\r\n","photo_file":"","caption":"","callouts":[]}'
After I insert the new record into the database (the parent is set correctly as well as the other columns), I go to Pages in BigTree and my new page is listed there and I click the Edit icon to modify the template resources and when the page loads there is nothing there. No text in the page header, or in the HTML editor (page_content), or a featured image.
So I know that I'm close but I just can't figure out why when the page loads it removes or at least doesn't correctly load all of my resource data. Is there something that you are aware of that I'm missing? Do I need to insert information in another table as well? Is what I'm trying to do even possible?
Thanks
That worked great!
Thanks