This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ///========================================================================== | |
| //*======================== how edit attributes and save in block in concrete5 ===================================* | |
| //========================================================================== | |
| //in edit/or view, we render the form for the atrribute | |
| //---------------------------------------------------------- | |
| $ak = CollectionAttributeKey::getByHandle("handle_name"); | |
| $caValue = $c->getAttributeValueObject($ak); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var newDoc = document.open("text/html", "replace"); | |
| newDoc.write(data); | |
| newDoc.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $al = Loader::helper('concrete/asset_library'); | |
| $al->file($formElementID, $formName, $chooseText, $fileObject = null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <!DOCTYPE adodb_schema [ | |
| <!ELEMENT schema (table*, sql*)> | |
| <!ATTLIST schema version CDATA #REQUIRED> | |
| <!ELEMENT table ((field+|DROP), constraint*, descr?, index*, data*)> | |
| <!ELEMENT field ((NOTNULL|KEY|PRIMARY)?, (AUTO|AUTOINCREMENT)?, (DEFAULT|DEFDATE|DEFTIMESTAMP)?, NOQUOTE, constraint, descr?)> | |
| <!ELEMENT data (row+)> | |
| <!ELEMENT row (f+)> | |
| <!ELEMENT f (#CDATA)> | |
| <!ELEMENT descr (#CDATA)> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function share(type) { | |
| var url = window.location.href; | |
| var title = window.document.title; | |
| if(type == 'facebook') { | |
| window.open("http://www.facebook.com/share.php?src=bm&u=" + url + "&t=" + title); | |
| }else if(type == 'twitter') { | |
| window.open("http://twitter.com/home?status=" + url); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Loader::model('page_list'); | |
| $pl = new PageList(); | |
| $pl->sortByMultiple('RAND()'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $valueOBJ = SelectAttributeTypeOption::getByValue($val, $ak); | |
| //se nao tem o valor ainda, adiciono ele | |
| if(! is_object($valueOBJ)){ | |
| SelectAttributeTypeOption::add( $ak , $val); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(preg_match('/localhost/',$_SERVER['HTTP_HOST'])){ | |
| define('DB_SERVER', 'localhost'); | |
| define('DB_USERNAME', 'root'); | |
| define('DB_PASSWORD', 'r00t05'); | |
| define('DB_DATABASE', 'eurosono'); | |
| }else{ | |
| define('DB_SERVER', 'mysql.eurosono.curupiradesign.com'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Loader::model('file_set'); | |
| $s1 = FileSet::getMySets(); | |
| $sets = array(); | |
| foreach ($s1 as $s){ | |
| $sets[$s->fsID] = $s->fsName; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function ListIn($dir, $prefix = '') { | |
| $dir = rtrim($dir, '\\/'); | |
| $result = array(); | |
| foreach (glob("$dir/*", GLOB_ONLYDIR) as $f) { | |
| $result[] = $f; | |
| $result = array_merge($result, $this->ListIn($f)); | |
| } | |
| return $result; | |
| } |
NewerOlder