I made a simple wiki to help companies (web agencies for example) list their projects, create guides related to these projects, and create links to project demonstrations (by categories).
You can have a demonstration of druwiki here : http://demos.jalalbricha.com/druwiki
To download or clone it, here : https://github.com/jbricha/druwiki
Maybe I will create a real Drupal distribution by following steps in here : https://drupal.org/developing/distributions/drupalorg , but I will need some hours to do it (because I have never did it before), and I'm not sure it's adding initial content, blocs positions and views ...
If you can help me do that (with features module maybe ...) that would very great!
Good luck apluche!
mardi 26 novembre 2013
lundi 25 novembre 2013
[jQuery] jimgPreview : Advanded image preview jQuery plugin
When I needed to display simple image previews when hovering links to images, I found the jQuery imgPreview here : http://james.padolsey.com/demos/imgPreview/full/ .
The problem with this plugin is when the link is located in the page bottom, a main part of the image preview (or all of it) is not diplayed at the screen. Because the image preview isalways displayed under the link position.
To resolve this problem, I made an other simple jQuery plugin that adapt the preview position according to the link position relatively to page bottom.
You can download it from my github : https://github.com/jbricha/jimgPreview
The problem with this plugin is when the link is located in the page bottom, a main part of the image preview (or all of it) is not diplayed at the screen. Because the image preview isalways displayed under the link position.
To resolve this problem, I made an other simple jQuery plugin that adapt the preview position according to the link position relatively to page bottom.
You can download it from my github : https://github.com/jbricha/jimgPreview
Try a demonstration
You are not forced to use href attribute, you can use any attribute you want, and init jimgPreview like that :$(document).ready(function() { $('a.jimg').jimgPreview({ srcAttr: 'preview_href' } ); });
mercredi 20 novembre 2013
[Drupal] Sort according to field node title
Same as term references, node reference fields are sorted occording to the nid, and not the node name.
What we should do to sort by nid :
Since the course field is an entity reference the sort would be working on the node id and not the node name. can you check this.
- Go to advanced, add a relationship to the content type ( displayed as Content; My content type (field_my_content_type) )
- Go back to that views field configuration (Or create sort criteria Content: Title) and select the relationship from the drop down.
- Go the the format settings and make the new field sortable.
It's tactful for a simple title field sort :/ But good luck !!
mardi 19 novembre 2013
[Drupal] Sort views according to a field term name alphabetical order
If you try to sort a view according to a vocabulary field, it will be sorted by terms tids and not by terms names. Views only sees the data as a bunch of tids. Because of this, allowing the sorting on that column would produce some unintended results.
Instead, you need to create a relationship. Once you've created your Content Taxonomy field, go to your View and add a relationship. Under the "Content" selections, pick the Content Taxonomy field you want sortable. Save that, and now you need to create a new field. Select "Taxonomy: Term" as your field and continue. In the new options and in the "Relationship" dropdown, select the relationship that you just created, make any other changes you'd like, then click the "Update" button. At this point, you should be able to click your "Style: Table" gear and be able to sort by term name. Just remember to save the changes to the View itself! =)
Instead, you need to create a relationship. Once you've created your Content Taxonomy field, go to your View and add a relationship. Under the "Content" selections, pick the Content Taxonomy field you want sortable. Save that, and now you need to create a new field. Select "Taxonomy: Term" as your field and continue. In the new options and in the "Relationship" dropdown, select the relationship that you just created, make any other changes you'd like, then click the "Update" button. At this point, you should be able to click your "Style: Table" gear and be able to sort by term name. Just remember to save the changes to the View itself! =)
jeudi 14 novembre 2013
[jQuery] Kill video.js player when navigating in fancybox
Using video-js player (flash fall-back mode) in fancyboxes causes a javascript loop error, during medias navigation in fancybox.
Here is the errors :
["Video.js: buffered unavailable on Flash playback technology element.", TypeError] Uncaught TypeError: Object #The problem is that, when we move from a video to an image, for example, in fancybox popup, previous player tags and DOM objects are removed before that video.js kill the previous player (what he would do after and causes the error loop). The solution was to destroy the player in the fancybox beforeLoad event. The function that destroy the player :has no method 'vjs_getProperty' 71 Uncaught TypeError: Cannot read property 'length' of undefined
function destroyPlayer() { if(typeof vjs != 'undefined' && typeof vjs("player_video_flash_api") != 'undefined') { vjs("player_video_flash_api").dispose(); } }And call it from fancybox code :
var defaultConfigs = { beforeLoad: function () { destroyPlayer(); }, beforeClose : function() { destroyPlayer(); }, }And you know how to init fancybox :
$('.media').fancybox(defaultConfigs);
Inscription à :
Commentaires
(
Atom
)