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 martin123456 »

I have the url to topic title installed plus this edit and its perfect so guess you have some other mod conflicting with it maybe ?

external links

Post by Stoker »

i think it is a php ini setting on my server

external links

Post by RMcGirr83 »

I've got mine fixed and didn't need to mess with any ini setting on the server and it also uses much less code. :P

external links

Post by Stoker »

Then post the code ;)

external links

Post by RMcGirr83 »

I would but then I would have to kill you :P

Here's a hint though

http://php.net/manual/en/class.domdocument.php
Last edited by RMcGirr83 on 21 Apr 2013, 17:10, edited 1 time in total.

external links

Post by Stoker »

No problem :fart:

external links

Post by neuropass »

if I post this link on my site:

Code: Select all

https://8pecxstudios.com/?page_id=24

I get this error:

Code: Select all

SQL ERROR [ mysql4 ]

Incorrect string value: '\xBB Cybe...' for column 'post_text' at row 1 [1366]

SQL

INSERT INTO phpbb_posts (forum_id, poster_id, icon_id, poster_ip, post_time, post_approved, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, post_username, post_subject, post_text, post_checksum, post_attachment, bbcode_bitfield, bbcode_uid, post_postcount, post_edit_locked, topic_id) VALUES (152, 2, 0, '216.121.119.55', 1366597254, 1, 1, 1, 1, 1, '', 'pl', '<!-- m --><a class=\"postlink\" href=\"https://8pecxstudios.com/?page_id=24\">8PECX Studios � Cyberfox</a><!-- m -->', '0942b1038d52d06b0b1c17edd86befcb', 0, '', '1fub0mqf', 1, 0, 7172)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions_posting.php
LINE: 2000
CALL: dbal_mysql->sql_query()

FILE: [ROOT]/posting.php
LINE: 1138
CALL: submit_post()
any idea what that means?

external links

Post by RMcGirr83 »

It is because of the title of that page
8PECX Studios &raquo; Cyberfox
and you probably have this in your code

Code: Select all

$text = html_entity_decode($text);
BTW, Stoker this is what I am using

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;
			}
not sure what happens though if a page doesn't have a title in it.

external links

Post by Stoker »

The code works fine with https
But if theres no title the link wont get posted at all

external links

Post by RMcGirr83 »

Show me a website that doesn't have a title por favor