external links

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

external links

Post by Stoker »

/robots.txt links and other documents
PDF isnt testet.

external links

Post by martin123456 »

Code: Select all

			$urlContents = file_get_contents($url);
			$dom = new DOMDocument();
			@$dom->loadHTML($urlContents);

			$title = $dom->getElementsByTagName('title');
			if ($title !== '')
			{
				$text = str_replace("\n", " ", $title->item(0)->nodeValue);
				break;
			}
Have you tested this with out using http or https ? it will show the /viewtopic.php?p=665#p665

http://www.blades-place.dyndns.info/vie ... p=665#p665
http://www.blades-place.dyndns.info/vie ... p=665#p665

not that it matters as the browser link will have http/https in it

:lol: and the space under the link is another link with out the http in it

Code: Select all

http://www.blades-place.dyndns.info/viewtopic.php?p=665#p665
www.blades-place.dyndns.info/viewtopic.php?p=665#p665

external links

Post by RMcGirr83 »

Have you tested this with out using http or https ? it will show the /viewtopic.php?p=665#p665
So does the other one as it is only affecting full urls within the includes/functions_content.php file.
and the space under the link is another link with out the http in it
I have no idea what this means and can not reproduce another link being served.

external links

Post by neuropass »

RMcGirr83 wrote:It is because of the title of that page
8PECX Studios » Cyberfox
and you probably have this in your code

Code: Select all

$text = html_entity_decode($text);
yea that was suggested from he mod author.. should I use this instead:

Code: Select all

			$urlContents = file_get_contents($url);
			$dom = new DOMDocument();
			@$dom->loadHTML($urlContents);

			$title = $dom->getElementsByTagName('title');
			if ($title !== '')
			{
				$text = str_replace("\n", " ", $title->item(0)->nodeValue);
				break;
			}

also the mod author suggested me to do this:

https://www.phpbb.com/kb/article/doesnt ... lue-errors

does that make sense?

external links

Post by RMcGirr83 »

Try this instead

Code: Select all

             $curl = curl_init();
             curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
             curl_setopt($curl, CURLOPT_URL, $url);
			 curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);
             $result = curl_exec($curl);
             curl_close($curl);         
             if(!empty($result))
             {
                $dom = new DOMDocument();
                if (@$dom->loadHTML($result))
                {
                   $title = $dom->getElementsByTagName('title');
                   if (!empty($title->item(0)->nodeValue))
                   {
                      $text = str_replace("\n", " ", $title->item(0)->nodeValue);
                      break;
                   }
                }
             }
Last edited by RMcGirr83 on 23 Apr 2013, 09:13, edited 2 times in total.

external links

Post by neuropass »

that works perfectly Rick!!!!!! I dont know how you can be so awesome. I need your brain! another thing though. it takes few secs to submit the post..on my forum with post below as an example (I tried here and it has the same delay. can that be reduced? why does it do that?)

If you are a 64 bit fanatic you probably have been looking around for web browser compiled for 64 bit OS architecture. So tell us what you use, why and what your thoughts are in a post below!

:likef:


so far:
http://www.palemoon.org/
http://namoroka-64-bit.software.informer.com/ (this is old I know)
http://www.firefox64bit.com/
http://download.cnet.com/Google-Chrome- ... 89057.html (Chrome 64 bit for Linux only)
ftp://ftp.opera.com/pub/opera/win/1214/en/ (opera 64 bit)
https://8pecxstudios.com/ (cyberfox)
http://tweakscene.com
Last edited by neuropass on 23 Apr 2013, 02:23, edited 1 time in total.

external links

Post by RMcGirr83 »

It does that because PHP has to parse the page that is retrieved via curl to get the title of the page.

external links

Post by neuropass »

gotcha. Thanks for the explanation. Do you think I should still run this as suggested by the author of that snippet?

https://www.phpbb.com/kb/article/doesnt ... lue-errors

external links

Post by RMcGirr83 »

My name is Rich nubs :P and no you shouldn't have to run that query.