Advertisement:

Author Topic: This code does not show in a post. Why?  (Read 8318 times)

kat

  • Guest
Re: This code does not show in a post. Why?
« Reply #20 on: December 10, 2010, 08:21:36 AM »
No.

Even I have to sleep, occasionally, though.

Do me a favour, will you?

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

Code: [Select]
[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?

Offline Arebias

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Dallas TDM 4.1
Re: This code does not show in a post. Why?
« Reply #21 on: December 10, 2010, 11:33:54 AM »


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.



Offline XerraX

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
Re: This code does not show in a post. Why?
« Reply #22 on: December 10, 2010, 11:52:27 AM »
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
« Last Edit: December 10, 2010, 11:57:10 AM by XerraX »
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

Offline Arebias

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Dallas TDM 4.1
Re: This code does not show in a post. Why?
« Reply #23 on: December 10, 2010, 12:39:01 PM »

@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?


Offline XerraX

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
Re: This code does not show in a post. Why?
« Reply #24 on: December 10, 2010, 12:52:47 PM »
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!

Offline Arebias

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Dallas TDM 4.1
Re: This code does not show in a post. Why?
« Reply #25 on: December 10, 2010, 01:19:15 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. ???

« Last Edit: December 10, 2010, 01:27:59 PM by Arebias »

Offline XerraX

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
Re: This code does not show in a post. Why?
« Reply #26 on: December 10, 2010, 01:55:58 PM »
Small workaround is to disable "Automatically link posted URLs" in:
Code: [Select]
smf/admin/?area=postsettings;sa=bbc
but then an important feature is missing.  :(
ReAliTy iS JuST a DrEAm. HaCk ThE PLaNet!

Offline Arebias

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Dallas TDM 4.1
Re: This code does not show in a post. Why?
« Reply #27 on: December 10, 2010, 02:42:47 PM »

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

  • Guest
Re: This code does not show in a post. Why?
« Reply #28 on: December 10, 2010, 02:53:06 PM »
I had another thought, about this one.

Could the link be changed, using tinyurl?

http://tinyurl.com

Offline XerraX

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
Re: This code does not show in a post. Why?
« Reply #29 on: December 10, 2010, 02:59:46 PM »
i made myself a dirty hack:

open Sources/Subs-Aeva.php

Search for
Code: [Select]
// 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:

Code: [Select]
// 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!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,098
  • Gender: Male
    • Kindred-999 on GitHub
Re: This code does not show in a post. Why?
« Reply #30 on: December 10, 2010, 03:12:04 PM »
???
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.

Offline Arebias

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Dallas TDM 4.1
Re: This code does not show in a post. Why?
« Reply #31 on: December 10, 2010, 03:21:49 PM »

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
Code: [Select]
[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.


Offline XerraX

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
Re: This code does not show in a post. Why?
« Reply #32 on: December 10, 2010, 03:25:39 PM »
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:

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

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

Offline Arebias

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Dallas TDM 4.1
Re: This code does not show in a post. Why?
« Reply #33 on: December 10, 2010, 03:50:16 PM »


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

Code: [Select]
// 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.

« Last Edit: December 10, 2010, 04:16:52 PM by Arebias »

Offline Arebias

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Dallas TDM 4.1
Re: This code does not show in a post. Why?
« Reply #34 on: December 10, 2010, 06:54:54 PM »

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!


Offline XerraX

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
Re: This code does not show in a post. Why?
« Reply #35 on: December 11, 2010, 07:38:21 AM »
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!

Offline mianosm

  • Semi-Newbie
  • *
  • Posts: 17
Re: This code does not show in a post. Why?
« Reply #36 on: June 28, 2012, 06:54:32 AM »
i made myself a dirty hack:

open Sources/Subs-Aeva.php

Search for
Code: [Select]

// 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:

Code: [Select]
// 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

  • Guest
Re: This code does not show in a post. Why?
« Reply #37 on: June 28, 2012, 09:54:43 AM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,032
    • Arantor on GitHub
Re: This code does not show in a post. Why?
« Reply #38 on: June 28, 2012, 02:16:55 PM »
Autolink works off the fact it sees www. - how else, exactly, would you reliably (and efficiently) do it for all subdomains?
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.