Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #996120

    Hello
    I have a website with 2 languages, (English – Arabic ), and I Use WPML as multilingual Plugin , it’s so powerful with enfold …
    The website main Idea is a portfolio for cinema director, and I built the portfolio pages mainly with 2 of Enfold elements < which is masonry portfolio , and horizontal gallery …
    In English version , the website is good, but in Arabic language which is RTL, there is a problems with that element

    1) the masonry in LTR language start previewing newest posts from left to right , BUT In RTL languge It show newest post also from left to right in the time it should shows the posts from right to left !!
    2) the horizontal gallery In English shows the photo from left to right , and in Arabic from right to left , but the problem with Arabic is with control of galley ( If I want to go to left photo i should press to the right narrow control ) … etc ….

    You can see the website here
    Masonry English (LTR)
    http://allaith-hajjo.net/work/
    Masonry Arabic (RTL)
    http://allaith-hajjo.net/work/?lang=ar
    horizontal gallery English (LTR)
    http://allaith-hajjo.net/portfolio-item/waq-waq/
    horizontal gallery Arabic (RTL)
    http://allaith-hajjo.net/portfolio-item/waq-waq/?lang=ar
    Thank You in Advanced , and sorry for my bad English
    Kasem

    • This topic was modified 6 years, 3 months ago by kasem-online.
    #996279

    any one can help me !!

    #996564

    Hi,

    Thank you for using Enfold.

    The RTL layout for masonry entries aren’t set by default. Please edit the config-templatebuilder > avia-shortcodes > masonry_entries > masonry_entries.js file. Remove everything and then replace it with the following code.

    // https://pastebin.com/ZpEdaEUf

    Best regards,
    Ismael

    #996758

    Hello Ismail … thanks so much , I replaced the code, but it’s not working … In fact nothing change !!

    #997400

    Hi,

    Thanks for the update. Did you purge the cache and disable the theme’s file compression options?

    Best regards,
    Ismael

    #997401

    Hi Ismael ….

    Yes it’s working now ….
    Thank you so much my friend :)

    but , what about the second problem ?

    2) the horizontal gallery In English shows the photo from left to right , and in Arabic from right to left , but the problem with Arabic is with control of galley ( If I want to go to left photo i should press to the right narrow control ) … etc ….

    thank you Ismael

    • This reply was modified 6 years, 3 months ago by kasem-online.
    #997418

    Hi!

    Glad it worked. Regarding the horizontal gallery: please edit the config-templatebuilder > avia-shortcodes > gallery_horizontal > gallery_horizontal.js file and then look for this code around line 139:

    prev.on('click', function(e)
    			{
    				if(currentIndex === false) currentIndex = 1;
    				var index = currentIndex - 1;
    				if(index < 0) index = 0;
    				
    				change_active(index);
    			});
    			
    			next.on('click', function(e)
    			{
    				if(currentIndex === false) currentIndex = -1;
    				var index = currentIndex + 1;
    				if(index > slide_content.length - 1) index = slide_content.length - 1;
    				
    				change_active(index);
    			});
    

    Replace it with:

    next.on('click', function(e)
    			{
    				if(currentIndex === false) currentIndex = 1;
    				var index = currentIndex - 1;
    				if(index < 0) index = 0;
    				
    				change_active(index);
    			});
    			
    			prev.on('click', function(e)
    			{
    				if(currentIndex === false) currentIndex = -1;
    				var index = currentIndex + 1;
    				if(index > slide_content.length - 1) index = slide_content.length - 1;
    				
    				change_active(index);
    			});
    

    Again, you need to toggle the file compression or disable it temporarily.

    Regards,
    Ismael

    #997728

    Well , It’s work With RTL …
    But In LTR it reversed …
    as I told on my first post , I Have 2 versions with WPML … English Whichis LTR and Arabic Which is RTL ….
    That Solution is suitable if i had one version with RTL , but not with wpml :(
    Is there any another solution ?

    By The way , I Noticed that the horizontal gallery doesn’t load all the photos to the page from first time , usually I need to refresh the page to load all the photos >> is there any problrem with that ?

    I Know I asked you too much , but really I need tons of solutions because of RTL website …

    Thank you in advanced Ismael …

    #997785

    Hi,

    My bad. I forgot that you’re using W P M L. Please revert the modifications back to default and then use this code instead.

    var rtl = $('body').is('.rtl');
    
    prev.on('click', function(e)
    {
    	if(currentIndex === false) currentIndex = 1;
    	var index = rtl ? currentIndex + 1 : currentIndex - 1;
    	if(index < 0 && !rtl) index = 0;
    
    	change_active(index);
    });
    
    next.on('click', function(e)
    {
    	if(currentIndex === false && !rtl) currentIndex = -1;
    	var index = rtl ? currentIndex - 1 : currentIndex + 1;
    	if(index > slide_content.length - 1 && !rtl) index = slide_content.length - 1;
    
    	change_active(index);
    });

    Best regards,
    Ismael

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.