examen: Всем привет :) Хотелось бы узнать возможно ли из обычного шаблона сделать шаблон для CMS. Если возможно то сложно ли это реализовывать на деле. Заранее спасибо за помощь.:)
В сети очень много информации, которая вас интересует, вот к примеру неплохая статья:
forest25: Скорее всего у вас на сайте уже подключен jquery (хотя это может быть и не так). Проще сделать на нем - $('#element-id').fadeIn();
Так и есть, скрипт какой то подключен:
!function ($) {
"use strict"; // jshint ;_;
$(function () {
$.support.transition = (function () {
var transitionEnd = (function () {
var el = document.createElement('bootstrap') , transEndEventNames = { 'WebkitTransition' : 'webkitTransitionEnd' , 'MozTransition' : 'transitionend' , 'OTransition' : 'oTransitionEnd otransitionend' , 'transition' : 'transitionend' } , name
for (name in transEndEventNames){ if (el.style[name] !== undefined) { return transEndEventNames[name] } }
}())
return transitionEnd && { end: transitionEnd }
})()
})
}(window.jQuery);/* ========================================================== * bootstrap-alert.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* ALERT CLASS DEFINITION * ====================== */
var dismiss = '[data-dismiss="alert"]' , Alert = function (el) { $(el).on('click', dismiss, this.close) }
Alert.prototype.close = function (e) { var $this = $(this) , selector = $this.attr('data-target') , $parent
if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 }
}(window.jQuery);/* ============================================================ * bootstrap-button.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION * ============================== */
var Button = function (element, options) { this.$element = $(element) this.options = $.extend({}, $.fn.button.defaults, options) }
Button.prototype.setState = function (state) { var d = 'disabled' , $el = this.$element , data = $el.data() , val = $el.is('input') ? 'val' : 'html'
state = state + 'Text' data.resetText || $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
// push to event loop to allow forms to submit setTimeout(function () { state == 'loadingText' ? $el.addClass(d).attr(d, d) : $el.removeClass(d).removeAttr(d) }, 0) }
Button.prototype.toggle = function () { var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$.fn.button.noConflict = function () { $.fn.button = old return this }
/* BUTTON DATA-API * =============== */
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { var $btn = $(e.target) if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') $btn.button('toggle') })
}(window.jQuery);/* ========================================================== * bootstrap-carousel.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CAROUSEL CLASS DEFINITION * ========================= */
То что вы делаете это клоакинг и за это возможна пессимизация.
Возможно ли тогда как-то скрыватьтекст под спойлером, оставляя его индексируемым, но без пессимизаций..?
UPDATE dle_post SET short_story = CONCAT('<div class="a"><div class="b">', short_story, '</div></div>');
Выполнил, однако это обернуло всю новость целиком, вместе с плеером. Возможно как-то обернуть только текст?
Всем привет :) Хотелось бы узнать возможно ли из обычного шаблона сделать шаблон для CMS. Если возможно то сложно ли это реализовывать на деле. Заранее спасибо за помощь.:)
В сети очень много информации, которая вас интересует, вот к примеру неплохая статья:
http://apache.kiev.ua/91-sozdaem-shablon-dlya-sayta-na-dle-iz-html-stranicy-chast-1-osnovnye-faily.html
Насколько я знаю - Пишешь в тех.п ВК с просьбой и они тебе сами её почистят.
$(document).ready(function(){$('.spoiler').hide();// <-- здесь
Тю блин, а я не мог разобраться почему не работает, а оказывается hide нужно было прописывать самым 1ым))) Спасибо!
hide() 10 раз
Ну и где это прописывать?
---------- Добавлено 19.07.2013 в 03:42 ----------
.......???
На DLE тоже если постараться будет хорошо...
HTML
Javascript
А можно как-то сделать чтоб изначально оно свернуто было?!
Без сомнений DLE!
Скорее всего у вас на сайте уже подключен jquery (хотя это может быть и не так). Проще сделать на нем - $('#element-id').fadeIn();
Так и есть, скрипт какой то подключен:
Он такой длинный что даже сюда не могу его вставить)
Вы ввели слишком длинный текст (59897 символов). Пожалуйста, сократите его до 10000 символов.
Как на нем сделать $('#element-id').fadeIn(); ? Я со скриптами мало дружу..