Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - nend
61
The Pub / Re: The Cookie Law (in the UK at least)
« on June 14th, 2012, 06:19 PM »
Setting cookies are no different then RFID's, how is it they are trying to frown on one and not the other. IMHO this law is BS and I still believe if any consent should be done it should be done on the client end and not the server.

We are delivering content, we shouldn't be responsible for figuring out these stupid cookie laws. What we are going to do soon read a 1,000 page manual of all the laws of the internet just to set up a personal webpage. Talk about some real treats to freedom of speech.

What I really hope happen is this law goes down the drain.

So would I like to see it as a software solution? I have to be honest here if a software is built around this then IMHO it isn't worth installing. If a software has this as a portion of it it must be configurable and not interfere with the software if disabled. Mainly this is worthy of a plugin and not a core component.
62
Bug reports / Re: Reply post showing as 'New'
« on June 9th, 2012, 02:12 AM »
Quote from Dragooon on June 9th, 2012, 01:29 AM
Quote from nend on June 8th, 2012, 07:51 PM
I was more like saying pass it on to JavaScript for a second request, not run it with the main page load. It should be transparent.
Ultimately that'll lead to even more load, as the queries for session authentication will have to be run twice plus the query to get the unread itself along with various other queries that are run.
I know, but will be transparent, maybe not the best solution thinking of it now.
63
Other software / Re: Aeva custom URL's
« on June 8th, 2012, 11:24 PM »
Figured another way around, just comment out one of my lines
Code: [Select]
     $context['aeva']['og_url'] = $embed;

Now I am questioning why I put that in there, must be a reason. :hmm:

This code that I already have in the head pulls from the url stored in Aeva if og_url isn't set.
Code: [Select]
$og_extra = isset($context['aeva']['og_url']) ?  '<meta property="og:video" content="'.$context['aeva']['og_url'].'">' : '<meta property="og:video" content="'.preg_replace(array('~\[url=([^]]*)][^[]*\[/url]~', '~\[url]([^[]*)\[/url]~'), '$1', $context['item_data']['embed_url']).'">';

Maybe it is old age, but I am only 28. Maybe there is a reason, maybe not, I don't remember. Looking at the code though there is more to the open graph thing, but I can't remember. Like the image part of it is tied into my code, I think, just found it through looking through it.

Code: [Select]
// Page thumbnail - Have to process the link tree for this, lol.
$rel_img = array_reverse($context['linktree']);
  if (isset($context['item_data']['current_thumb'])) {
$context['rel_image'] = $context['item_data']['current_thumb'][0];
} else if (isset($context['thumb']) && $context['thumb'] != '') {
$context['rel_image'] = 'http://wrestletopia.2-si.net/n/img/b/sm/'.$context['thumb'];
} else if (isset($board_info['thumb']) && $board_info['thumb'] != '') {
$context['rel_image'] = 'http://wrestletopia.2-si.net/n/img/b/sm/'.$board_info['thumb'];
} else if (isset($rel_img[1]) && file_exists($boarddir.'/img/b/sm/'.$rel_img[1]['name'].'.png')) {
$context['rel_image'] = 'http://wrestletopia.2-si.net/n/img/b/sm/'.$rel_img[1]['name'].'.png';
} else {
$context['rel_image'] = 'http://wrestletopia.2-si.net/n/img/viral/site_thumb.png';
}

and some of that is tied into my board images hack. O well it works now, I think maybe broke something commenting out my own code. Maybe it is a old remnant of a old way I used to do it.
64
Other software / Re: Aeva custom URL's
« on June 8th, 2012, 11:05 PM »
I may as well supply the open graph hack for Aeva if anyone finds it useful.

In Aeva-Embed.php Find
Code: [Select]
// All ampersands need to be &, however some may be already encoded. So to prevent double-encoding, convert them back to &, then back again
$object = str_replace(
array('&', '&', '&nbsp;', '&amp;', '<aeva-embed>', '<aeva-link>', '<aeva-title>'),
array('&', '&', ' ', '&', $embed, $input[2], isset($title) ? $title : $input[2]),
$object);
if (strpos($object, '<flashvars>') !== false)
$object = str_replace('<flashvars>', substr(strrchr($embed, '?'), 1), $object);

// Reduce remaining replacements allowed
if ($context['aeva']['remaining'] != -1)
{
$context['aeva']['remaining'] -= 1;
$context['aeva']['remaining_per_page'] -= 1;
}

Add Before
Code: [Select]
     $context['aeva']['og_url'] = $embed;

In you index.template.php add this bit to somewhere in the head area.
Code: [Select]
// Open Graph
if (isset($context['item_data']['type']) && $context['item_data']['type'] == 'video' || isset($context['item_data']['type']) && $context['item_data']['type'] == 'embed') {
$og_type = 'video';
$og_extra = isset($context['aeva']['og_url']) ?  '<meta property="og:video" content="'.$context['aeva']['og_url'].'">' : '<meta property="og:video" content="'.preg_replace(array('~\[url=([^]]*)][^[]*\[/url]~', '~\[url]([^[]*)\[/url]~'), '$1', $context['item_data']['embed_url']).'">';
}
echo '
<meta property="og:title" content="', $context['page_title_html_safe'], '"/>
<meta property="og:type" content="'.(isset($og_type) ? $og_type : 'website').'"/>';
// <meta property="og:url" content="'.(!empty($context['canonical_url']) ? $context['canonical_url'] : 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']).'"/>
echo '
<meta property="og:image" content="'.$context['rel_image'].'"/>
<meta property="og:site_name" content="Wrestle Topia"/>
<meta property="og:description" content="'.str_replace('"', ' ',$context['meta_description']).'"/>
'.(isset($og_extra) ? $og_extra : '');

Also you will have to add this bit in your html tag
Code: [Select]
xmlns:og="http://ogp.me/ns#"
65
Other software / Aeva custom URL's
« on June 8th, 2012, 10:58 PM »
I have a question, I want a certain formatting in Aeva custom sites list but when I do it it doesn't work.

Here is the working.
Code: [Select]
$sites[] = array(
'id' => 'ytsp',
'title' => 'YouTube Series & Playlist',
'website' => 'http://www.youtube.com',
'type' => 'custom',
'plugin' => 'other',
'pattern' => 'http://(?:www\.)?youtube\.com/embed/videoseries\?list=([0-9a-z]{18})',
'movie' => '<iframe width="853" height="480" src="http://www.youtube.com/embed/videoseries?list=$2" frameborder="0" allowfullscreen></iframe>',
);

This one doesn't work.
Code: [Select]
$sites[] = array(
'id' => 'ytsp',
'title' => 'YouTube Series & Playlist',
'website' => 'http://www.youtube.com',
'type' => 'custom',
'pattern' => 'http://(?:www\.)?youtube\.com/embed/videoseries\?list=([0-9a-z]{18})',
'movie' => 'http://www.youtube.com/embed/videoseries?list=$2',
'fix-html-pattern' => '<iframe width="853" height="480" src="$1" frameborder="0" allowfullscreen></iframe>',
);

I may be missing something, the first one works but I rather have the movie defined as a url and not code because I output these in a open graph hack I made.

No big deal if Aeva wasn't designed to do this, I can just regex the url from the html iframe code. -_-
66
Bug reports / Re: Reply post showing as 'New'
« on June 8th, 2012, 07:51 PM »
I was more like saying pass it on to JavaScript for a second request, not run it with the main page load. It should be transparent.
67
Bug reports / Re: Reply post showing as 'New'
« on June 8th, 2012, 05:10 PM »
Can't you have both, you can do slow queries that return no information via JavaScript after the page has loaded. Would that be a good time to do clean up?
68
Bug reports / Re: Reply post showing as 'New'
« on June 8th, 2012, 05:43 AM »
I noticed that behavior on my SMF installation also. I was wondering about what was the cause. I haven't dug in there yet but any possible solutions?
69
I haven't used it in a long time, if I recall I don't think it was supported in earlier versions. Maybe wrong but I am pretty sure it wasn't. O'well it is already in there. :eheh:

*edit

I think multiple question support wasn't, maybe that is what I edited in the sources a long time ago. I just did it comma delimited with a explode for multiple answers.
70
Will there be BBC support in the verification questions?

Sometimes it is nice to add a picture in there and ask a question about it.
71
Off-topic / Re: Function Time Limit
« on June 4th, 2012, 05:04 PM »
The ext is installed on my cheap account. :niark:
72
Off-topic / Re: Function Time Limit
« on June 3rd, 2012, 04:19 AM »
That is sad, :sob:, you would think there would be a way to do this by now.
73
Off-topic / Function Time Limit
« on May 29th, 2012, 06:11 AM »
I was wondering is there any way in PHP to set a time limit on a PHP function. Say if the function is not done in a certain amount of time the function execution is cancelled and the function returns nothing.

What I want to do is start a heavy query and if the query doesn't finish in a certain amount of time have the query stop and the function exited.
74
The Pub / Re: The Cookie Law (in the UK at least)
« on May 25th, 2012, 06:57 PM »
I have been trying to fight my government on some of these ridiculous laws also. However one of the ways to fight them is to help others in other countries fight for their rights too. If you notice one country does it then the others follow, so maybe it is a matter a time til the USA does this. I feel if we can prove some of these laws useless then we might have a fighting chance at stopping them where they started.
Quote from markham on May 25th, 2012, 06:34 PM
Quote from nend on May 25th, 2012, 04:23 PM
Yay we are starting to censor communication more and more. I am thinking about writing a letter to your government who set up this law and tell them they are setting a bad example for the rest of the world. This is BS that you all have to code around this just for a few that are tracking users for unjust purposes.
Hey - don't blame us, we didn't invent this law! Blame the EU and in particular the Danish Commissioner who dreamt-up this load of malarkey.
Not blaming anyone here, maybe I came out misunderstood. Our government structures are more than likely different, so don't really know who is responsible for anything over there.
75
The Pub / Re: The Cookie Law (in the UK at least)
« on May 25th, 2012, 04:23 PM »
Quote from markham on May 25th, 2012, 11:49 AM
@Ox - The BBC is using Geo-location to determine whether or not to seek cookie acceptance which better minds than mine reckon is a bit dangerous.
Don't look like Geo-location, I am in the USA and getting the same message on the BBC website.

Yay we are starting to censor communication more and more. I am thinking about writing a letter to your government who set up this law and tell them they are setting a bad example for the rest of the world. This is BS that you all have to code around this just for a few that are tracking users for unjust purposes.