Skip to content

Instantly share code, notes, and snippets.

ghazal

Block or report user

Report or block ghazal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ghazal
ghazal / videoBackground_usage.js
Last active Oct 12, 2018
videoplayer for lomart
View videoBackground_usage.js
jQuery(function($){
$(document).ready(function() {
//init youtube
var tag = document.createElement('script');
// tag.src = "https://www.youtube.com/iframe_api";
tag.src = "https://youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
View storage
////// POUR LE MODULE CUSTOM -- EFFACER CETTE LIGNE APRES USAGE
<div role="tabpanel" class="tab-pane" id="ptabreminder">
<p ng-hide="hasItems()">Pas de sélection</p>
<div ng-repeat="(day, daysessions) in sessions" ng-show="hasItems()">
<h5 class="myh5">{{ day }}</h5>
<ul>
<li ng-repeat="session in daysessions">
{{ session.slot }}, {{ session.room }}:<br /> <a ng-href="{{session.link}}">{{ session.title }}</a> - <span style="cursor:pointer" ng-click="toggleSession(session.id)">x</span>
</li>
@ghazal
ghazal / forum.css
Last active Dec 8, 2017
css pour forum
View forum.css
/* A tester avec :
Live CSS Editor pour Chrome
https://chrome.google.com/webstore/detail/live-css-editor/oelggcmknbjmhkpgjfhakedcfnkgbdpg
Custom Style Script pour Firefox
https://mybrowseraddon.com/custom-style-script.html */
.js-post__content-text, p {font-size: 1.2em; line-height: 1.6; }
.announcement-tabs .announcementtext span {
display: block;
@ghazal
ghazal / plugin.js
Created Jun 12, 2017
Plugin Save dé-minifié
View plugin.js
tinymce.PluginManager.add("save", function(e) {
function t() {
var t;
if (t = tinymce.DOM.getParent(e.id, "form"), !e.getParam("save_enablewhendirty", !0) || e.isDirty()) return tinymce.triggerSave(), e.getParam("save_onsavecallback") ? (e.execCallback("save_onsavecallback", e), void e.nodeChanged()) : void(t ? (e.setDirty(!1), t.onsubmit && !t.onsubmit() || ("function" == typeof t.submit ? t.submit() : n(e.translate("Error: Form submit field collision."))), e.nodeChanged()) : n(e.translate("Error: No form element found.")))
}
function n(t) {
e.notificationManager.open({
text: t,
type: "error"
View default.php
<?php
/**
* @version CVS: 1.0.1
* @package Com_Crmform
* @author Eric Fagault <eric.fagault@laposte.net>
* @copyright Copyright (C) 2015. Tous droits réservés.
* @license GNU General Public License version 2 ou version ultérieure ; Voir LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
@ghazal
ghazal / default.php
Last active Apr 28, 2016
Add ID or Alias of Category in templates/yourtemplate/html/com_content/featured/default.php
View default.php
<?php
/**
* Voir lignes 39 et 69
* J'ai utilisé l'alias de catégorie.
* echo $leadingcount ." cat-$item->category_alias";
* A priori, on peut aussi lancer l'iD
* <div class="leading-<?php echo $leadingcount ." cat-$item->catid"; ?>
* La spécification peut aussi s'appliquer à blog.php d'une catégorie. Voir tout en bas du document.
* /
View whereami.php
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>O&ugrave; suis-je ?</title>
</head> <body> <div style="font-size:24px; font-weight:bold">D&eacute;termination des variables</div> <div style="border-top:1px solid
#FFCC00;font-size:14px;font-weight:bold;padding-top:15px;color:#FF6600">Ouvrez votre fichier configuration.php et remplacez
la valeur des variables par les &eacute;l&eacute;ments ci dessous :</div>
View testinclusion.php
<?php
$db = JFactory::getDBO();
$query = "SELECT * FROM #__categories WHERE section = 1";
$db->setQuery($query);
$list = $db->loadObjectList();
foreach ($list as $item) {
View prism.html
Une adresse d'encodeur/décodeur d'entités :
http://www.web2generators.com/html-based-tools/online-html-entities-encoder-and-decoder
JavaScript, CSS et PHP ne nécessitent pas d'être réencodés, seulement HTML.
Il faut encoder les entités comme < >:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
devient :
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;
@ghazal
ghazal / demo-doc.html
Created Feb 15, 2015
jquery.mb.YTPlayer
View demo-doc.html
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
You can’t perform that action at this time.