last day (16 days later) » 

5:12 PM
hey there :)
 
hi
so
 
thank you for your interest first of all
 
you are welcome
 
I've updated the index.php, single.php, page.php as you already mentioned
:)
 
ok
follow me
 
5:13 PM
I also updated the header.php with the exposed script
yes
 
assuming you have different pages
example:
one page is for portfolio
and only this page load some portfolio script
maybe a slider
what you have to do is to place all the js and css file in the header
i mean the header.php
then
 
ur js code?
 
nope
 
oh
 
you just need to understand the process
 
5:16 PM
I try my best :)
 
ok
i have to make a demo
it's the only way
 
nope
do you have teamviewer?
:)
 
in this moment no
 
I can share my desktop with you
it's easy .. you don't have to make a lot of steps
Join remote control session
and I'll give you the pass
 
i know but in this moment i can't do that
;)
 
5:19 PM
it's ok
 
i will make this example
 
no prob
 
i create a carousel
that load via ajax
 
it's not that simple believe me
the carousel it's something ..basic
rev slider it's more than that
 
is something near to what you need?
i mean a page that have content that need a js execution
if i'm not wrong you have content that need to use js but now don't work cause you use AJAX
right?
 
5:21 PM
Buzinas has spend a good few hours to make that solution works... and in the end he give up because it's beyond what we can do .. it's about rev slider behaviour
yes
that's why I already opened a icket to rev slider
 
i don't think it's a rev slider problem
 
but it's not as let's say working into a basic regular theme
excepting the errors exposed there are more freezing behaviours
rev slider and also visual composer that use parallax effect
:)
 
do rev slider have a method to call a defined slider ?
 
I am sure that it will work on a simple clean theme
I suppose as long as it was included in the code
<script>
function ajax(url, callback, method, params) {
if (!method) method = 'GET';

var xhr = new XMLHttpRequest();
xhr.open(method, url);

if (callback) xhr.addEventListener('load', function() {
callback.call(this, xhr);
});

if (params) {
params = Object.keys(params).map(function(key) {
return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
}).join('&');
xhr.send(params);
} else {
xhr.send();
}
}

// CUSTOM AJAX CONTENT LOADING FUNCTION
function ajaxRevslider(obj) {

// obj.type : Post Type
but as I've said, I've tried already 2 ajaxify solutions, spoked with the author of one of them, trying to develop, and stuff and the problem it's damn tricky
it's not like using a 2 lines code because of the theme code/plugins installed :)
we just need to wait for the rev slider response and I'll ask Buzinas to reformulate the final answer according to my site situation and environment
 
that script where it is situated?
 
5:28 PM
here
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta http-equiv="cleartype" content="on">
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<meta name="HandheldFriendly" content="True">
<style>
.hidden {
display: none;
}
</style>
<script>
 
this is the header.php?
 
yes
 
that is code you tried or it's a core rev slider code?
 
that is the last almost working version of what Buzinas tried to develop
not rev slider
rev slider it's another story :)
files and files with code
I think that you know already the complexity of that plgin
 
do a thing for me
 
5:31 PM
sure
 
create a slider with rev slider and navigate to it look in the source code
copy past here
 
I already have a few in my pages
 
then go in another page where there is not a rev slider
 
ok,
 
and copy past the source code
 
5:33 PM
ok
can I use the existing pages
 
sure
 
?
ok
 
one should have rev slider and one not
 
but first I have to disable your code /or any other code right?
i mean ajaxify solutions
 
yes go as in the beginning
 
5:34 PM
sure
 
without any mod
 
in a few sec
 
k
 
yes
here we go..
this page is without parallax, actually it's a plain page with text styles
code
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta http-equiv="cleartype" content="on">
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<meta name="HandheldFriendly" content="True">
<link rel="profile" href="http://gmpg.org/xfn/11">
and this page have some elements including a parallax
source code
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta http-equiv="cleartype" content="on">
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<meta name="HandheldFriendly" content="True">
<link rel="profile" href="http://gmpg.org/xfn/11">
 
ok ok i will see the code from your site
do you have also one with rev-slider?
 
5:39 PM
as you wish
the second page have a rev slider parallax
this one
 
ok
let me see
 
and.... if you want to go deeper, there are visual composer elements also using parallax effect but produced but this other plugin
 
ok
now
please open the header.php and copy past
 
yes
 
you are using the latest version of WP?
 
5:47 PM
yes
4.3.1
 
i need the header.php code
pls copy past it
 
sure
 
here
 
yes
I have 2 versions
one with logotext/ menu outside the wrapper
and one (as it was) with the logotext/ menu inside the wrapper
which one do you preffere
?
:)
 
i want the original one
 
5:51 PM
sure
 
the one you are using now
 
ok
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta http-equiv="cleartype" content="on">
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<meta name="HandheldFriendly" content="True">
 
6:06 PM
why you have HTML code in the header?
i need the original file the original from the theme
ah
ok
my bad
 
:)
it's fine
I usually ask myself why is the files full of code no matter what code :)
 
don't warry
ok
so now make a copy of header.php
and create a new header.php with this code inside
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta http-equiv="cleartype" content="on">
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<meta name="HandheldFriendly" content="True">
 
i have a few
ok,
 
also make the changes i told before to single, page and index
i have to make some test
 
sure
done
should I update the header.php too?
with your SO code?
 
6:18 PM
ok we are near
you there?
 
yes
can you please refresh the site? a few moments I end up uploading
 
refresh?
 
it think that filezilla messing around
 
the chat?
 
nope
the site
neuegrid.com
F5
 
6:21 PM
mmm what you get?
anyway
don't warry
 
ok
 
we have to make another test on the header.php
 
sure
 
replace all the code in the header
heade.php
with this one
use the raw code button
or copy past from the textarea at the bottom
 
done
uploaded
 
6:25 PM
ok
let me check
 
sure
 
6:38 PM
ok replace with this codepad.org/LH9eI3rk always the header
i think we are on the right direction
 
sure in a few seconds
 
you are changed something else in the meanwhile?
i noticed the home page is changed?
 
nope
nothing
 
ok
 
now I have uploaded ur last code
 
6:41 PM
ok try now
go to the home
and click parallax
 
I am there
 
it take a little to load
also make sure
to click because that sliding effect on the menu is very annoying
 
the menu is made to work only on click so ...
anyway ... the elements are freezing
beginning with second visit
it will be fine if we hit refresh button
please ty to open 2 browser windows and visit home, after that parallax
and the same thing in other page but after that hit f5
 
ok
 
to see the behaviour
also there is something wrong with the link .. because it's not changing from a page to another
is fixed
for the record
:)
as far as I understand, we are testing only the paralax page right?
 
6:57 PM
as you see if you try to load the parallax from this page neuegrid.com/typography it works
 
nope
the elements are loaded but the parallax is not working
open another window and hit refresh
to see the parallax
please
the parallax is frozen
Actually , that's the issue
 
let's try this one codepad.org/nwqhMg9s
always in the header
 
sure
done
nope the same story
 
7:17 PM
i see
 
:)
 
but for parallax you mean the blue banner with the text "NOVIO" or the images below it?
 
the main parallax is the NOTIO text on black background
and also the parallax are the other elements
 
below the main parallax
 
7:19 PM
if you can send me the theme and the plugin i can test it locally it will speed up the work a lot
because we are there
the only problem
is i have to find the funtion that load the parallax
then we just call it
after the ajax is loaded
 
now seems to work fine?
but the menu/ logotext is not kept on refresh
I can do that aswell
as well
 
wait
try with this codepad.org/OjHGbOEx
there was an error from codepen
 
ok,
 
BTW the only thing you have to do is to find each plugin call then i have made a switch in my function
 
it was fine early
 
7:25 PM
var slug = "http://www.neuegrid.com/home-parallax-elements2/".replace(/http\:\/\/www\.neuegrid\.com/g, '').replace(/[^a-z\-0-9]/gi, '');


jQuery('#ajax-content').empty().hide().load(this.href + '?' + 'ajax=true', function() {

if (slug == 'home-parallax-elements2') {
for eaxmple when the ajax load a link that point to home-parallax-elements2
you call the function that is needed for that specific page
that's all
 
simple as that?
:)
 
obvioulsy now it is hard
because the site
is not designed to do that from the start
 
true
 
but with some work it can be done
not much code is needed
 
..that work is out of my knowledge
unfotunately that's why I've opened the thread
:)
I can send you the theme
but the point is that I'm not so sure if will work like it works on my server
 
7:28 PM
also another problem are with links
eaxmple
 
because the main theme was pretty custom made
 
take the slider
 
ok,
 
on the home page
it load well but arrow and dots doesn't work
 
are disabled
oh u're right
arrows should work
on refresh will work
in the end these are just template pages, I can't use a code costom made only for a page
the code should apply on every page
that's the tricky part
 
7:32 PM
this is the biggest problem
because it require more code
;)
 
but after the code is made...
 
you should make something also on the WP background so that when you create a page you can tell what plugin to load
on ajax call
 
if I use other new parallax slider for example
 
this is the flow
 
i see
 
7:34 PM
1 - on the backend you have to add something so that when you create a new page
and add for example a parallax
it call the parallax funtion
2 - then since each plugin work with ID reference you have to find a way to call exaclty that plugin for that element
 
I understand your point but pretty hard to make it .. Anyway I'll try to find a workaround somehow
using different plugins or I'll have to see
 
the only way is the one i said to you
the easiest way
is
if theese plugins have a method
that can tell
if that page have a that plugin
example function
if( this_page_has('parallax') ) {}
you then know that this page have parallax
and you know also the id of the page
and you just call it
after ajax load
 
sounds easy but I can't tell
 
ask to rev-slider dev if the plugin have a method like this
 
Sure
 
7:39 PM
i guess it have
then you put on single, index and page that function
 
I'll ask these details
there are 2 plugins
revolution slider / Visual composer
that use parallax
effect
and I'll see
anyway, at this moment I have different alternatives more or less functional
but It's a place to start
 
tell the dev you want to do something like this
<?php

if( page_have_revslider() ){
echo "<script> var ajax_load = '".json_encode( array('plugin' => 'revlsider', 'page_id' => get_the_ID()) )."'; </script>";
}

?>
 
wow, thanks
 
once you have it place in index, page and single
 
I'll ask
the same for visual composer?
<?php

if( page_have_js_composer() ){
echo "<script> var ajax_load = '".json_encode( array('plugin' => 'js_composer', 'page_id' => get_the_ID()) )."'; </script>";
}

?>
 
7:46 PM
then inside the script i have made in the beginning
put this after load
if( ajax_load !== undefined ) {
if( ajax_load.plugin == 'revslider' ) {
reve_slider_function( ajax_load.page_id );
}
}
yes
the same for visual composer
 
and if's could be merged? for js_composer and revslider?
something like
f( ajax_load !== undefined ) {
if( ajax_load.plugin == 'revslider','js_composer' ) {
reve_slider_function( ajax_load.page_id );
}
}
sorry
if( ajax_load !== undefined ) {
if( ajax_load.plugin == 'revslider','js_composer' ) {
reve_slider_function( ajax_load.page_id );
}
}
nope ... you get the point
:)
 
in order to compine it you then need to have an array
something like if( page_has_plugins() ) {}
foreach( page_has_plugins() as $plugin ){ //output a json from arrat of lugin }
*array of plugin
 
good to know
 
ok first ask to the plugin devs if there is a way to know if a single page need to load a plugin
 
sure
 
7:53 PM
then come back to me
now i have to go
 
I appreciate it
thank you
 
i like to solve problems
;)
 
:)
I have this disorder too but in other fields
 
i know this because i have already made a site like this, but from scratch
 
coding it's not my field unfortunately
:)
i see
 
7:55 PM
90% those plugin have a way to know if they need to load
beacsue they store something in database
even if they don't have a buildin function
you can create one
 
i got it :)
that's why you that is not that hard to call it somehow
you know*
 
sure once you have this and know the JS function to call you have done
if you look in the source code of the parallax page
you'll notice under the html a js script code
revapi13 = tpj("#rev_slider_13_1").show().revolution({
that is the revolution functio
function
that call for the "#rev_slider_13_1" element
 
make sense because, I just received an answer to my earlyer question
The best option for Ajax is to just add the slider's shortcode to a regular page/post, and then the slider's "init" script is will automatically be included with the slider's HTML. Then when the slider's HTML is removed from the DOM, all jQuery events are also removed. So all you really need to do is pull in the slider as page/post content, and then you won't need any custom script for the slider specifically.
 
know that 13_1 can be (not sure) page "13" and slider "1"
infact
the only problem with that approach is that if a plugin is not designed to use shortcode how do you do it?
ok, nice to talk with U, got to go. see you around for the next round
;)
 
the plugin use shortcodes
sure
all the best
 
8:04 PM
let me know
how it goes
 

  last day (16 days later) »