Notice: CMS Builder v1.14 released!
13 posts by 4 authors in: Forums > CMS Builder
Last Post: October 2, 2008 (RSS)
By Dave - April 16, 2008 - edited: April 18, 2008
We've just released v1.13, with some new features and many improvements and bug fixes.
Some of the new features include:
- A new "Insert Media" button on the wysiwyg that lets you insert swf, wmv, and other media files.
- Multi-section Searching - you can now search multiple sections at the same time, even if they have different fields. See attached viewer (multiSearch.php) for an example of how this works.
- And many other usability and compatibility improvements based on forum feedback.
For a full list of changes, visit the CMS Builder changelog:
http://www.interactivetools.com/products/cmsbuilder/changelog.html
CMS Builder users can upgrade by donation at this page:
http://www.interactivetools.com/upgrade/
Keep your feature requests and bug reports coming in! Every single release we've done is packed full of user requested changes. Post to the forum or send us an email at dave@interactivetools.com.
See you in the forum! :)
interactivetools.com
Re: [Dave] Notice: CMS Builder v1.14 released!
By Dave - April 18, 2008 - edited: February 10, 2009
BUG FIXES
- Viewers: Fixed undefined index error where Single Page Viewers were setting _link value even if no record was found
- Home Menu: Fixed bug with optional homepage menu (enabled in /lib/menus/home.php) where it wasn't displaying
Only 2 files have changed and I've attached those. So feel free to just replace these files if you want to avoid the hassle of re-uploading everything. Make a backup first (just rename the old file and add .backup on the end).
/lib/viewer_functions.php
/lib/menus/home.php
Let me know if you have any questions.
interactivetools.com
Re: [Dave] Notice: CMS Builder v1.14 released!
By HDBC - May 1, 2008
Upon further investigation I found that the upgrade directions do not tell us to upload the "cmsAdmin/images/icon" folder to get the new icon(s) added.
Uploading these images took care of the spacing problem.
Re: [HDBC] Notice: CMS Builder v1.14 released!
By Dave - May 1, 2008
I've updated that in the upgrade text for the next version and in the online docs here: http://www.interactivetools.com/docs/cmsbuilder/upgrade.html
Thanks!
interactivetools.com
Re: [Dave] Notice: CMS Builder v1.14 released!
By Djulia - July 15, 2008
I try to obtain a research on several tables, but that does not function.
I always have : No records matched search query!
Is multiSearch.php always valid for the version 1.19 ?
Thank you for your answer.
Djulia
Re: [Djulia] Notice: CMS Builder v1.14 released!
By Dave - July 16, 2008
Thansk for reporting that! It looks like that get broken last release. I've fixed it for 1.21. Here's how to fix your version:
- Open /lib/viewer_functions.php
- Search for $subqueries[] (around line 679)
- Add the line in red (below "# create query")
$subqueries[] = $subquery;
}
# create query
$schema = array('_content' => array()); // allow this field to be searched in _getWhereForSearchQuery
$where = _getWhereForSearchQuery($searchOptions['keywords'], array('_content'), $schema);
Let me know if that fixes it for you!
interactivetools.com
Re: [Dave] Notice: CMS Builder v1.14 released!
By Djulia - July 21, 2008 - edited: July 21, 2008
I use also successfully your function to obtain the first NNN number of words :
[url "http://www.interactivetools.com/forum/forum.cgi?url=http%3A%2F%2Fwww.interactivetools.com%2Fforum%2Fforum.cgi%3Furl%3Dhttp%253A%252F%252Fwww.interactivetools.com%252Fforum%252Fforum.cgi%253Fpost%253D58872"]http://www.interactivetools.com/forum/forum.cgi?post=58872[/#336699][/url]
It is perhaps possible to optimize it ?
"remove all tags" isn't necessary any more for multiSearch.php ?
// remove all tags and reutnr first NNN words of content
function getTextSummary($value, $maxWords = 25) {
$textOnly = preg_replace("/<(.*?)>/s", " ", $value); // strip tags
$words = preg_split("/\s+/", $textOnly);
$words = array_splice($words, 0, $maxWords);
$summary = join(" ", $words);
return $summary;
}
<?php
$record['_summary'];
print getTextSummary($record['_summary'], 25); // returns 25 words
print (" ...");
?>
Thank you for your assistance.
Djulia
Re: [Djulia] Notice: CMS Builder v1.14 released!
By Dave - July 22, 2008
If you don't want it to strip tags you can replace this:
$textOnly = preg_replace("/<(.*?)>/s", " ", $value); // strip tags
With this:
$textOnly = $value;
Hope that helps!
interactivetools.com
Re: [Dave] Notice: CMS Builder v1.14 released!
By Djulia - July 22, 2008
I have two other questions.
1) It would be possible to return an error message if the sought word is lower at 1 or 2 characters ?
2) It would be possible to prohibit words (at, the, of ...) ?
Thank you for your answer.
Djulia
Re: [Djulia] Notice: CMS Builder v1.14 released!
By Dave - July 23, 2008
// error on short words
$word = "hello";
if (strlen($word) <= 2) { die("Word is too short!"); }
// error on banned words
$word = "often";
$bannedWords = array('at','the','of');
if (in_array(strtolower($word), $bannedWords)) { die("Word '" .htmlspecialchars($word). "' is not allowed!"); }
// remove banned words from array
$bannedWords = array('at','the','of');
$myWords = array('red','blue','the','green');
$myWords = array_diff($myWords, $bannedWords);
// show what's left in array
print "<xmp>";
print_r($myWords);
print "</xmp>";
You'd still need to write logic for cases such as when the only words users searched for were ignored or banned and what to do in that case.
Hope that helps!
interactivetools.com