• Welcome to Simple Machines Community Forum. Please login or sign up.
December 08, 2021, 01:43:35 AM

News:

Wondering if this will always be free?  See why free is better.


This code does not show in a post. Why?

Started by Arebias, December 09, 2010, 01:59:40 PM

Previous topic - Next topic

kat

No.

Even I have to sleep, occasionally, though.

Do me a favour, will you?

Copy/paste this in to a post on your forum.

[url=http://www.simplemachines.org][img]http://www.katzy.dsl.pipex.com/Smileys/link.gif[/img][/url]



Does it work, OK?

If you click the image, does it bring you here?

Arebias



Yes. It worked just fine. It created the image, the link worked, and when I went back and hit "modify' the link was in it's original state. It did not mangle the link like it does the one I placed in there.

So apparently it has something to do with the word 'cache' being in front of the www. as in cache.www.



XerraX

December 10, 2010, 11:52:27 AM #22 Last Edit: December 10, 2010, 11:57:10 AM by XerraX
we are having the same problem in our forums.

smf 2 rc4

ps: other thread, but same problem ->
http://www.simplemachines.org/community/index.php?topic=412178.msg2874107#msg2874107
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

Arebias


@XerraX  ...    Please take a look at the list of Mod's that we have installed and compare to your list then post the similarities. What Mod's do we have in common?


XerraX

Search User In MP
Users Online Today
Aeva Media (we use Aeva lite)

btw funny thing is, that in signature area the code works, only in post content area it does not.
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

Arebias

December 10, 2010, 01:19:15 PM #25 Last Edit: December 10, 2010, 01:27:59 PM by Arebias

Quote from: XerraX on December 10, 2010, 12:52:47 PM
btw funny thing is, that in signature area the code works, only in post content area it does not.


As it does on ours as well. I just checked this out. In signatures it works, In posts it does not.


And from the list above the only Mod that I can see that would be parsing any links would be Aeva Media. More than likely this is the culprit. I did uninstall everything however there could have been some code manipulation involved with the Aeva that was not removed or that I missed.

But Aeva was installed on the 1.1.11 version and all worked well on that. ???


XerraX

Small workaround is to disable "Automatically link posted URLs" in:
smf/admin/?area=postsettings;sa=bbc

but then an important feature is missing.  :(
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

Arebias


Fixed!

OK. I uninstalled Aeva Media and went through and made sure that every instance of this mod was removed. I must have missed something before.

Now it is not parsing the link and the banner shows up properly as it does here on this forum.

So to summarize: With the Aeva Mod the parsing of the URL is a problem in a post but works fine in signatures. Without the mod installed the forum works as intended.

I will go to the Aeva thread and web site and post a link to this topic and inform them of the problem and they can go from there if they wish.



kat

I had another thought, about this one.

Could the link be changed, using tinyurl?

http://tinyurl.com

XerraX

i made myself a dirty hack:

open Sources/Subs-Aeva.php

Search for

// Links urls that haven't already been linked
function aeva_autolink_urls($input)
{
global $context, $modSettings;

// Should haven't got here if autolinking of urls is disabled
if (empty($modSettings['autoLinkUrls']))
return $input;


and replace it with:


// Links urls that haven't already been linked
function aeva_autolink_urls($input)
{
global $context, $modSettings;

// Should haven't got here if autolinking of urls is disabled
if (empty($modSettings['autoLinkUrls']))
return $input;

if (preg_match("/gametracker/i", $input))
return $input;
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

Kindred

???
Didn't I just go over this with someone?

This is a problem with smf (sort of) not with aeva.
mostly, it's a problem with that website ont using a standard url address format.

The problem is that smf interprets www as the START of a web address, so it is attempting to make the URL that is SEES into a link because that cache.www screws it up.


I honestly don't call this an actual SMF "bug" and I would prefer telling the stupid people who used that format or url to use a proper format.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arebias


Well I read all that pertains to this in the other thread XerraX referred me to. I saw what you said. If you really think that they are going to change the format that they use based on this forum platform not being able to parse it correctly then I guess I could try that approach. I seriously doubt it though.

I kinda like where XerraX is going. Could someone with the coding knowledge possibly determine why the word 'cache' seems to cause this? In the example K@ posted for me to troubleshoot with
[url=http://www.simplemachines.org][img]http://www.katzy.dsl.pipex.com/Smileys/link.gif[/img][/url]

it worked fine. It seems that the word 'cache' is the problem. 


Never mind I re-read your response over there on the other thread.


XerraX

its not the word cache, its the . (dot) + www the parser thinks that with www a new url starts.

http://cache.   www.gametracker.com/server_info

http://www.katzy.dsl.pipex.com/Smileys/link.gif

if you look at the code you can see it:


// Parse any URLs....
if (preg_match('~http://|www\.~i', $input))


http:// OR www
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

Arebias

December 10, 2010, 03:50:16 PM #33 Last Edit: December 10, 2010, 04:16:52 PM by Arebias


Ok. So can the code be changed to this and it still work:


// Parse any URLs....
   if (preg_match('~http://|www|cache.www\.~i', $input))



I am asking you to try because I removed it 100% from my site and am not going to re-install until I have a good fix.


Arebias


I had the full gallery version and that is why I did not have Subs-Aeva.php. I installed the lite version that you have on my testing site and your fix works just fine for that.

I tried that other I suggested and although it caused no errors it did nothing to fix the problem. I think I will just install the lite version as you have and change the code to what you suggested and go with that.

Thanks!


XerraX

Oh i see... in Aeva full it should be Aeva-Embed.php

same code to replace

i didnt test it. but it seems to be the same code.
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

mianosm

Quote from: XerraX on December 10, 2010, 02:59:46 PM
i made myself a dirty hack:

open Sources/Subs-Aeva.php

Search for


// Links urls that haven't already been linked
function aeva_autolink_urls($input)
{
global $context, $modSettings;

// Should haven't got here if autolinking of urls is disabled
if (empty($modSettings['autoLinkUrls']))
return $input;


and replace it with:


// Links urls that haven't already been linked
function aeva_autolink_urls($input)
{
global $context, $modSettings;

// Should haven't got here if autolinking of urls is disabled
if (empty($modSettings['autoLinkUrls']))
return $input;

if (preg_match("/gametracker/i", $input))
return $input;



This is an excellent fix, seemingly still working.

Quote
SMF 2.0.2 | SMF © 2011, Simple Machines
SimplePortal 2.3.5 © 2008-2012, SimplePortal
Embedding by Aeva Media, © Noisen Aeva ~ Auto-Embed Video & Audio    7.1

If you're still subscribed or reading: thanks a bunch XerraX

MrPhil

It's more of a hack/workaround than a real fix, because now your code has a deeply embedded reference specific to your domain name. At the very least, make a list somewhere of such things so you can remember to update them all should you move your site or SMF be updated.

If the basic problem is that <some subdomain>.www.domain.TLD is not being treated as a single unit in automatic link generation, then something needs to be done to fix that. Frankly, I've never understood people who write www.<subdomain>.domain.TLD or <subdomain>.www.domain.TLD -- it makes no sense (v. <subdomain>.domain.TLD) -- but still, SMF should properly handle it. If the autolink code keys off of www., it is somewhat limited in that it won't pick up subdomains, but that's a separate issue.

Arantor

Autolink works off the fact it sees www. - how else, exactly, would you reliably (and efficiently) do it for all subdomains?
No good deed goes unpunished
All helpful urges should be circumvented

Advertisement: