[BETA] External Link MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
ohlookitspaul
Registered User
Posts: 27
Joined: Fri Dec 16, 2005 5:05 am

Post by ohlookitspaul » Sun Mar 12, 2006 9:35 pm

Is there anyway to get this so that it works with phpbb Fetch All?

http://www.hatesomethingbeautiful.com

whenever I click on a link from the main page, it says internal server error. it works when I click the link from the forum though.

EDIT - never mind, i'm stupid. i figured it out.

CKOTuHA
Registered User
Posts: 1
Joined: Thu Feb 09, 2006 11:12 pm
Contact:

Post by CKOTuHA » Mon Mar 13, 2006 9:23 am

I am sorry but I at start db_update.php (tried then install.php) in both cases have following mistake:
Warning: implode(): Bad arguments. in /home/best4ru7/public_html/install/db_update.php on line 105

I checked all edited files - everything is all right in what there can be a problem?

dcz
Registered User
Posts: 787
Joined: Sun Feb 13, 2005 5:37 am
Contact:

Re: [BETA] External Link MOD

Post by dcz » Mon Mar 13, 2006 9:54 am

kkroo wrote: To Use this MOD you MUST you must retain my credit link in the file pane_top.tpl!
Keeping the google Ad to my account would be highly appreciated.


Well, the first thing you ask can be ok, but some could just give you one good BL and save its design (besides, there are many way to achive what you have done), but the second I never saw :)
And I am not even sure it's that comfortable to use, since you are not suppose to use adsence from several accounts on the same page, here it's a frame, but many framed pages are considered as only one by google, so it's not that obvious they'd like suche thing, but who knows with them ;)

Actually, yes, I have seen one guy comming up with a google search box mod linked to his google adsence.

So I am getting inspired here for the "MY GOOGLE ADSENCE on your site" MOD :)

++

phpBB SEO || phpBB3 SEO Premod || SEO phpBB3
GYM Sitemaps & RSS for phpBB3: GYM Sitemaps & RSS

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo » Mon Mar 13, 2006 6:29 pm

CKOTuHA wrote: I am sorry but I at start db_update.php (tried then install.php) in both cases have following mistake:
Warning: implode(): Bad arguments. in /home/best4ru7/public_html/install/db_update.php on line 105

I checked all edited files - everything is all right in what there can be a problem?


This will make it easier for you, here is the SQL query:

Code: Select all

CREATE TABLE phpbb_external_link (
    by TEXT NOT NULL,
    sites TEXT NOT NULL
);

INSERT INTO phpbb_external_link VALUES('Omar Ramadan','');

dcz, I am giving the option to the people, it is only if they want, I am not keeping it a secret from the people like that guy with the google search box mod did. If you don't want to leave it linked to the account, I don't mind at all.
Last edited by kkroo on Thu Mar 16, 2006 1:06 pm, edited 1 time in total.
My MODs

Need a coder?

Enjoy my Mods? - Image

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Wed Mar 15, 2006 12:16 pm

kkroo wrote: Version 1.3.3 released:
Fixed a bug that I found when the user is refered from google and I cleaned the code some and I added the Spanish and Dutch language into the zip.


Dutch language file is not included if I am right... I just downloaded the mod from this topic. (Are you confusing german with dutch?) because German and Spanish are included.

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Wed Mar 15, 2006 2:01 pm

1) Easy mod installs the mod ok!

2) Final step says it has no sql entries to query :?

3) So I use the install/install.php file. I get this error
Updating the Database
S;

Fout: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S' at line 1
E;

Fout: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'E' at line 1



Installation Complete
Please, be sure to delete your install directory and this file from your phpBB installation now.


4) Because of this I have this error in my ACP
Error retrieving External Link data

DEBUG MODE

SQL Error : 1146 Table 'hetvogel_phpbb1.phpbb_external_link' doesn't exist

SELECT `sites` FROM phpbb_external_link WHERE `by` = 'Omar Ramadan'

Line : 82
File : admin_link.php


5) In order to do the necessary sql entry I use the sql parser
http://sql.phpmix.com/index.php

for this code
CREATE TABLE `phpbb_external_link` (
`by` text NOT NULL,
`sites` text NOT NULL
)
INSERT INTO phpbb_external_link VALUES('Omar Ramadan','')


and this sql parser returns me with this error
Conversion to MySQL failed!

--------------------------------------------------------------------------------
Total Processing Time (ms): 9.67
Total SQL Statements Processed: Not available
Total SQL Statements Generated: Not available

--------------------------------------------------------------------------------
Error: Unexpected or unknown attribute "NOT_NULL) INSERT INTO PHPBB_EXTERNAL_LINK VALUES(___0___,___1___", in "sites text NOT NULL) INSERT INTO phpbb_external_link VALUES(___0___,___1___", statement: 1, table: "phpbb_external_link"
SQL: CREATE TABLE phpbb_external_link(by text NOT NULL,sites text NOT NULL) INSERT INTO phpbb_external_link VALUES('Omar Ramadan','')

--------------------------------------------------------------------------------
2 Warning(s) Reported:
Missing semicolon, it might be an indication of further syntax errors, statement: 1
Identifier "by" is a reserved keyword (reference: SQL 99), statement: 1, table: "phpbb_external_link"


Can anyone help?

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo » Thu Mar 16, 2006 1:04 pm

Hey,

I don't know why it does that, i used http://sql.phpmix.com/index.php :?
For now until i fix it up, use the SQL query in the previous post i edited.
My MODs

Need a coder?

Enjoy my Mods? - Image

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Thu Mar 16, 2006 3:41 pm

I just did to check if it will parse the sql
1 Warning(s) Reported:
Identifier "by" is a reserved keyword (reference: SQL 99), statement: 1, table: "phpbb_external_link"


but it is just a warning, not an error anymore. :wink:

I will try to install the mod again during the coming days. I will let you know if every works ok.

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Thu Mar 16, 2006 11:27 pm

It works now :D , I have seen the options in ACP. (I installed the sql directly in phpmyadmin; it could only install the code with 'by' instead of by.....)

But how can you manage the other way around. I installed this mod because I want internal pages on our portal to be framed also. I have a portal on which we put some url's. This url's are stored on the same phpbb folder. When people open this url's this pages will not be framed; but I want some pages to be framed.
In the ACP you can only allow pages that shouldn't be framed; but I want it just the other way around. Is this possible?

One more question. Is it correct that this MOD will not frame an url if you directly enter www.url.com instead of http://www.url.com ? So if the http:// is missing; the MOD will not frame?

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Mon Mar 20, 2006 10:12 pm

Eddy Kiprich wrote: It works now :D , I have seen the options in ACP. (I installed the sql directly in phpmyadmin; it could only install the code with 'by' instead of by.....)

But how can you manage the other way around. I installed this mod because I want internal pages on our portal to be framed also. I have a portal on which we put some url's. This url's are stored on the same phpbb folder. When people open this url's this pages will not be framed; but I want some pages to be framed.
In the ACP you can only allow pages that shouldn't be framed; but I want it just the other way around. Is this possible?

One more question. Is it correct that this MOD will not frame an url if you directly enter www.url.com instead of http://www.url.com ? So if the http:// is missing; the MOD will not frame?


Do you have any idea kkroo?

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo » Tue Mar 21, 2006 8:16 am

so you want to be able to control which pages to frame?

that is done very easily:
open link.php
Find:

Code: Select all

      
      if ( preg_match($host,$link_host) ) return TRUE;
   }
   return FALSE;
}
Replace with:

Code: Select all

      if ( preg_match($host,$link_host) ) return FALSE;
   }
   return TRUE;

Yes that is true, to change that:

open: include/bbcode.php

Find:

Code: Select all

	$bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
Replace with:

Code: Select all

	$bbcode_tpl['url4'] = str_replace('{URL}', 'link.'.$phpEx.'?url=http://\\1', $bbcode_tpl['url']);
My MODs

Need a coder?

Enjoy my Mods? - Image

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Tue Mar 21, 2006 9:00 am

Thank you very much, I will try it.

Can you maybe explain "in words" what is the difference in code between link.php and include/bbcode.php. Which code manages what?
When I know this I know how to change the code in order to do exactly what I want.

Can you also hard-code to frame internal ánd external links both?

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo » Tue Mar 21, 2006 9:45 am

the difference between bbcode.php and link.php is that bbcode.php manages the post and searches for a url in the post to put the link.php infront of. link.php manages the url and finds out if it should show in a frame or not.

so u want both internal annd external links to show in a frame? undo what you did in link.php from the previous post.

open link.php

find:

Code: Select all

$host_array = array_merge(array($host), $site_array); 
Replace with:

Code: Select all

$host_array = $site_array; 
that should do it.

this way you can still control what not to show in frames, but if it is not in the list, show in a frame.
My MODs

Need a coder?

Enjoy my Mods? - Image

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Tue Mar 21, 2006 12:03 pm

kkroo wrote: the difference between bbcode.php and link.php is that bbcode.php manages the post and searches for a url in the post to put the link.php infront of. link.php manages the url and finds out if it should show in a frame or not.

so u want both internal annd external links to show in a frame? undo what you did in link.php from the previous post.

open link.php

find:

Code: Select all

$host_array = array_merge(array($host), $site_array); 
Replace with:

Code: Select all

$host_array = $site_array; 
that should do it.

this way you can still control what not to show in frames, but if it is not in the list, show in a frame.


Ok excellent!!! This option works as you suggested! Greath!!! :D

I had a "crazy wish" that this mod would also frame url's (links) on my portal (ezPortal by Smartor). But unfortunatelly it won't do it.. even with this last options that internal ánd external url's are framed on the forum; the portal keeps "untouched". If this MOD would also frame links on ezPortal than it would fulfill all my wishes but it doesn't untill now.

I don't know if you can manage anything related framing url's on ezPortal?

I will also make a post on his forum (http://smartor.is-root.com/) to see if they have a good solution for framing a portal-url. (like if you are on my portal www.hetvogelforum.nl, go down-left and click on banner-links, this kind of pages need to be framed)

Anyway; if it is ezPortal "compatible" yes or not; I still like this MOD very much; if it would be compatible with ezPortal then it would be a greath MOD :wink:

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo » Tue Mar 21, 2006 1:05 pm

could you send me a PM of the code of the tpl file for the portal, with the list of things u want to show in a frame, i will do what i can.
My MODs

Need a coder?

Enjoy my Mods? - Image

Post Reply

Return to “[2.0.x] MODs in Development”