-
Notifications
You must be signed in to change notification settings - Fork 7
Drupal_old
====== CMS Drupal ======
===== Управление Drupal с помощью Drush =====
Прежде всего, необходимо drupal:drush.
- Извлекаем Drupal последней актуальной версии (6.19) в заданную папку ''drupal6'' в папке вебсервера ''/var/www'':
sudo cd /var/www sudo drush dl drupal --drupal-project-rename=drupal6
- Чтобы извлечь определенную версию друпала в папку, например текущий релиз-кандидат, нужно сделать так:
sudo cd /var/www sudo drush dl drupal-7.0-rc2 --drupal-project-rename=drupal7
- Чтобы обновить ядро или модули на мультисайтовой связке, без запуска скрипта обновления БД, необходимо зайти в директорию какого-либо сайта в этой связке, и выполнить ''sudo drush upc'':
sudo cd /var/www/drupal/sites/example.com/ sudo drush upc
sudo cd /var/www/drupal/sites/example.com/
sudo drush up
===== Мультиязычность в Drupal6 =====
===== Views =====
===== CCK =====
===== Inline content editing (also known as "edit in place") =====
Ссылки по проблеме:
- http://groups.drupal.org/node/9935
- http://chicago2011.drupal.org/conference/bof/inline-editable-fields-drupal-7
Модули:
- http://drupal.org/project/editablefields
- http://drupal.org/project/jeditable
- http://drupal.org/project/arrange_fields
- http://drupal.org/project/editview
- http://drupal.org/project/eazyedit
- http://drupal.org/project/editinplace
- http://drupal.org/project/slickgrid
===== Boosting Drupal ===== Boosting Drupal - mean nginx, Varnish, memcache, etc
Ссылки:
- http://drupal.org/project/boost
- http://serverfault.com/questions/398000/drupal-nginx-and-my-own-website?rq=1
- http://habrahabr.ru/post/110958/
- http://wiki.nginx.org/Drupal
- http://beeznest.wordpress.com/2012/09/20/drupal-7-https-nginx-varnish-apache-boost-apc-securepages/
- http://groups.drupal.org/node/26485
- http://drupal.org/node/1054886
===== Ajax Forms in Drupal 7 =====
- http://drupal.org/node/752056
- http://api.drupal.org/api/drupal/includes%21ajax.inc/group/ajax/7
- http://www.drupal.ru/node/77567
- http://azbukaweb.ru/ajax-forms-in-drupal-7
- http://randyfay.com/ajax
- http://internetdevels.ru/blog/ctools-modal-api
- http://preprocess.me/multi-steps-form-in-drupal-7-with-ctools
===== Multilanguage in Drupal ===== Допустим, что заданный язык - русский.
Это запрос, выбирающий все материалы на русском, и добавляет те материалы, у которых нет перевода на русский, показывая их оригиналы.
SELECT nid, title, language, tnid
FROM `node`
WHERE
`language` = 'ru' OR /*все русские, хоть оригинал, хоть перевод*/
(language != 'ru' AND tnid != 0) OR /*все нерусские, не переведенные вообще*/
(tnid !=0 AND tnid=nid AND tnid NOT IN (
SELECT tnid FROM node WHERE language='ru' AND tnid != 0 /* все русские, являющиеся оригиналами */
)
/*выдаст все нерусские оригиналы, у которых нет перевода на русский*/
)
ORDER BY `node`.`language` DESC
===== CCK (Drupal 5, 6) and Field API (Drupal 7) ===== Взять список полей у конкретной ноды: Drupal 6 $type = content_types($type_name); $fields = $type['fields']; https://drupal.org/node/663876
Drupal 7 http://api.drupal.org/api/drupal/modules--field--field.info.inc/function/field_info_instances/7 http://drupal.org/node/957558
===== Class Hierarchy ===== http://drupal.org/node/1554736
http://drupal.org/sandbox/fgm/1553284
http://stackoverflow.com/questions/5640303/get-a-php-objects-ancestors-in-the-inheritance-tree
$object = 'protocols_handler_filter_term_node_tid';
$class = new ReflectionClass($object);
$lineage = array();
while ($class = $class->getParentClass()) {
$lineage[] = $class->getName();
}
echo "Lineage: " . implode(", ", $lineage);
echo "\n\n";
$classess = get_declared_classes();
echo "Classes: " . implode(", ", $classess);
Output:
Lineage: views_handler_filter_term_node_tid, views_handler_filter_many_to_one, views_handler_filter_in_operator, views_handler_filter, views_handler, views_object
Classes: stdClass, Exception, ErrorException, Closure, DateTime, DateTimeZone, DateInterval, DatePeriod, LibXMLError, DOMException, DOMStringList, DOMNameList, DOMImplementationList, DOMImplementationSource, DOMImplementation, DOMNode, DOMNameSpaceNode, DOMDocumentFragment, DOMDocument, DOMNodeList, DOMNamedNodeMap, DOMCharacterData, DOMAttr, DOMElement, DOMText, DOMComment, DOMTypeinfo, DOMUserDataHandler, DOMDomError, DOMErrorHandler, DOMLocator, DOMConfiguration, DOMCdataSection, DOMDocumentType, DOMNotation, DOMEntity, DOMEntityReference, DOMProcessingInstruction, DOMStringExtend, DOMXPath, finfo, LogicException, BadFunctionCallException, BadMethodCallException, DomainException, InvalidArgumentException, LengthException, OutOfRangeException, RuntimeException, OutOfBoundsException, OverflowException, RangeException, UnderflowException, UnexpectedValueException, RecursiveIteratorIterator, IteratorIterator, FilterIterator, RecursiveFilterIterator, ParentIterator, LimitIterator, CachingIterator, RecursiveCachingIterator, NoRewindIterator, AppendIterator, InfiniteIterator, RegexIterator, RecursiveRegexIterator, EmptyIterator, RecursiveTreeIterator, ArrayObject, ArrayIterator, RecursiveArrayIterator, SplFileInfo, DirectoryIterator, FilesystemIterator, RecursiveDirectoryIterator, GlobIterator, SplFileObject, SplTempFileObject, SplDoublyLinkedList, SplQueue, SplStack, SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue, SplFixedArray, SplObjectStorage, MultipleIterator, ReflectionException, Reflection, ReflectionFunctionAbstract, ReflectionFunction, ReflectionParameter, ReflectionMethod, ReflectionClass, ReflectionObject, ReflectionProperty, ReflectionExtension, __PHP_Incomplete_Class, php_user_filter, Directory, SimpleXMLElement, SimpleXMLIterator, SoapClient, SoapVar, SoapServer, SoapFault, SoapParam, SoapHeader, PharException, Phar, PharData, PharFileInfo, XMLReader, XMLWriter, ZipArchive, mysqli_sql_exception, mysqli_driver, mysqli, mysqli_warning, mysqli_result, mysqli_stmt, PDOException, PDO, PDOStatement, PDORow, DrupalCacheArray, SchemaCache, krumo, DrupalDatabaseCache, DatabaseConnection, Database, DatabaseTransactionNoActiveException, DatabaseTransactionNameNonUniqueException, DatabaseTransactionCommitFailedException, DatabaseTransactionExplicitCommitNotAllowedException, DatabaseTransactionOutOfOrderException, InvalidMergeQueryException, FieldsOverlapException, NoFieldsException, DatabaseConnectionNotDefinedException, DatabaseDriverNotSpecifiedException, DatabaseTransaction, DatabaseStatementBase, DatabaseStatementEmpty, DatabaseConnection_mysql, Query, InsertQuery, DeleteQuery, TruncateQuery, UpdateQuery, MergeQuery, DatabaseCondition, InsertQuery_mysql, TruncateQuery_mysql, SelectQueryExtender, SelectQuery, EntityFieldQueryException, EntityFieldQuery, EntityMalformedException, DrupalDefaultEntityController, UserController, PagerDefault, TableSort, DrupalLocalStreamWrapper, DrupalPublicStreamWrapper, DrupalPrivateStreamWrapper, DrupalTemporaryStreamWrapper, CommentController, DateObject, DOMDocumentAndvanced, DOMElementAdvanced, EntityReferenceRecursiveRenderingException, FieldException, FieldUpdateForbiddenException, FieldValidationException, Entity, EntityDB, EntityExtendable, EntityDBExtendable, FieldCollectionItemEntity, NodeController, RulesLog, RulesException, RulesEvaluationException, RulesIntegrityException, RulesDependencyException, FacesExtendableException, FacesExtender, FacesExtendable, EntityAPIController, EntityAPIControllerExportable, RulesEntityController, RulesExtendable, RulesPlugin, RulesAbstractPlugin, RulesAbstractPluginDefaults, RulesRecursiveElementIterator, RulesContainerPlugin, RulesActionContainer, RulesConditionContainer, RulesAction, RulesCondition, Rule, RulesReactionRule, RulesAnd, RulesOr, RulesLoop, RulesActionSet, RulesRuleSet, RulesEventSet, RbViewsArgumentValidator, RulesElementMap, RulesPluginUI, RulesAbstractPluginUI, RulesContainerPluginUI, RulesConditionContainerUI, RulesActionContainerUI, RulesRuleUI, RulesReactionRuleUI, RulesRuleSetUI, RulesLoopUI, RbViewsArgumentValidatorUI, TaxonomyTermController, TaxonomyVocabularyController, views_many_to_one_helper, views_join, views_join_subquery, views_object, views_handler, views_handler_filter, views_handler_filter_broken, views_handler_filter_in_operator, views_handler_filter_many_to_one, views_handler_filter_term_node_tid, protocols_handler_filter_term_node_tid
И ко всему этому прикрутить еще http://www.chromeexperiments.com/detail/graph-drawer/. Вуу-хуу! :) Также полезно посмотреть: http://drupalcontrib.org/api/drupal/contributions%21views%21tests%21handlers%21views_handler_sort.test/class/ViewsHandlerSortTest/7 http://habrahabr.ru/post/77064/ http://coderbay.com/top-jquery-tree-plugins/
Footer is under construction
Sidebar is under construction