Skip to content

Drupal_old

andyceo edited this page Jan 19, 2014 · 1 revision

====== 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
- Чтобы обновить ядро или модули на мультисайтовой связке сайтов, и автоматически запустить скрипт обновления БД (''update.php''), нужно зайти в директорию сайта и оттуда запустить ''sudo drush up'':sudo cd /var/www/drupal/sites/example.com/ sudo drush up

===== Мультиязычность в Drupal6 =====

===== Views =====

===== CCK =====

===== Inline content editing (also known as "edit in place") =====

Ссылки по проблеме:

Модули:

===== Boosting Drupal ===== Boosting Drupal - mean nginx, Varnish, memcache, etc

Ссылки:

===== Ajax Forms in Drupal 7 =====

===== 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://phpclub.ru/talk/threads/%D0%9F%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C-%D0%B8%D0%BC%D0%B5%D0%BD%D0%B0-%D0%B2%D1%81%D0%B5%D1%85-%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BE%D0%B2-%D0%B8%D0%B7-%D1%84%D0%B0%D0%B9%D0%BB%D0%B0-%D0%BB%D0%B8%D0%B1%D0%BE-%D0%B8%D0%BC%D0%B5%D0%BD%D0%B0-%D0%B2%D1%81%D0%B5%D1%85-%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BE%D0%B2-%D0%BF%D0%BE%D1%82%D0%BE%D0%BC%D0%BA%D0%BE%D0%B2-%D1%80%D0%BE%D0%B4%D0%B8%D1%82%D0%B5%D0%BB%D1%8F.51526/

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/

Sidebar is under construction

Clone this wiki locally