PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Joe
Jun 21, 2013 21:06
Jasper is correct :)
Joe
Jun 21, 2013 21:05
It's a start haha
Joe
Jun 21, 2013 21:04
No problem!
Joe
Jun 21, 2013 21:04
Working for me now :D
Joe
Jun 21, 2013 21:04
or just use service httpd reload
Joe
Jun 21, 2013 21:03
*to let the
Joe
Jun 21, 2013 21:03
Have you tried restarting apache to changes to httpd.conf take effect?
Joe
Jun 21, 2013 21:01
:) I understand that but you've listed /home/fun as the doc root of fun.voidwhisperer.info in your httpd.conf file. What I meant was that your server is sending back a 403 Forbidden error in the response header when you try to access fun.voidwhisperer.info
Joe
Jun 21, 2013 20:57
Try setting it to 755 (rwxr-x---)
Joe
Jun 21, 2013 20:56
/home/fun I mean.
Joe
Jun 21, 2013 20:55
One second, I'm getting a 403 Forbidden error from your fun.voidwhisperer.info page. What are the permissions on that folder?
Joe
Jun 21, 2013 20:54
What is the layout of the directory? Do you still have the default index.html in there?
Joe
Jun 21, 2013 20:53
@VoidWhisperer - what do you have in /home/fun/?
 

audiojs

Example
Joe
Jun 11, 2013 21:14
to $(document).on('click', '.article-play', function(e) {
Joe
Jun 11, 2013 21:13
also change $('.article-play').click(function(e) {
Joe
Jun 11, 2013 21:11
no you won't. removing var makes it global
Joe
Jun 11, 2013 21:10
*bit
Joe
Jun 11, 2013 21:10
just remove the var but
Joe
Jun 11, 2013 21:10
audiojs.events.ready(function() {
as = audiojs.createAll({
Joe
Jun 11, 2013 21:09
audiojs.events.ready(function() {
var as = audiojs.createAll({
Joe
Jun 11, 2013 21:09
Then change the original js on the page from:
Joe
Jun 11, 2013 21:08
Ok, you should be able to remove: audiojs.events.ready(function() { }); from around the ajax code
Joe
Jun 11, 2013 21:01
Would you be able to just put my code back up on the site so I can check some things? I can only see the old js at the moment
Joe
Jun 11, 2013 20:46
It checks whether as in defined or not. If it is then it doesn't overwrite the original. If it's undefined then it works like normal.
Joe
Jun 11, 2013 20:46
if (typeof as !== "undefined"){
var newAudio = createAudio();
$.extend(as, newAudio);
}else{
as = createAudio();
}

var createAudio = function () {

return audiojs.createAll({

// Setup the player to autoplay the next track
trackEnded: function () {
var next = $('.main article.playing').next();
if (!next.length) next = $('.main article').first();
next.addClass('playing').siblings().removeClass('playing');
audio.load($('.article-play', next).attr('data-src'));
audio.play();
$('.article-play', next).removeAttr('data-playa').attr("data-pausea", '5');
Joe
Jun 11, 2013 20:45
Ok, try this:
Joe
Jun 11, 2013 20:40
One second, I made a mistake in that code!
Joe
Jun 11, 2013 20:39
var as = audiojs.createAll({

// Setup the player to autoplay the next track
trackEnded: function() {
var next = $('.main article.playing').next();
if (!next.length) next = $('.main article').first();
next.addClass('playing').siblings().removeClass('playing');
audio.load($('.article-play', next).attr('data-src'));
audio.play();
$('.article-play', next).removeAttr('data-playa').attr("data-pausea", '5');
var nextPlay = $('.article-play', next);
$('.article-play').not(nextPlay).removeAttr('data-pausea').attr("data-playa", '4');
Joe
Jun 11, 2013 20:39
Instead of:
Joe
Jun 11, 2013 20:39
as = as.push(createAudio) || createAudio;

var createAudio = function () {

return audiojs.createAll({

// Setup the player to autoplay the next track
trackEnded: function () {
var next = $('.main article.playing').next();
if (!next.length) next = $('.main article').first();
next.addClass('playing').siblings().removeClass('playing');
audio.load($('.article-play', next).attr('data-src'));
audio.play();
$('.article-play', next).removeAttr('data-playa').attr("data-pausea", '5');
var nextPlay = $('.article-play', next);
Joe
Jun 11, 2013 20:39
Maybe try this:
Joe
Jun 11, 2013 20:37
I think I understand, hold on...
Joe
Jun 11, 2013 20:36
I got a similar one when I was testing and tried to redefine the original audio.js object
Joe
Jun 11, 2013 20:36
You're also getting this error in the console: 'TypeError: 'undefined' is not an object (evaluating 'progress.style.width = (scrubber.offsetWidth * percent) + 'px'')'
Joe
Jun 11, 2013 20:35
Ah ok, I see.
Joe
Jun 11, 2013 20:32
I'm just taking a look now, one second..
Joe
Jun 11, 2013 20:29
Hi Ilya!