Links Plugin Errors And Fixes »  Show posts from    to     

Icy Phoenix


General Support - Links Plugin Errors And Fixes



MWE_001 [ Thu 11 Aug, 2016 02:56 ]
Post subject: Links Plugin Errors And Fixes
I had posted in another thread which not so smart to do. I am going to consolidate it all here. The original was Here.

Quote:
The links plugin, if you put your site info in the ACP and click submit, it does not seem to save the submitted info? If you go to the links page on your website and then copy the html to a clipboard to "link to our site" it copies all the html code, but under further review, it is not injecting the websites url so basically, that renders it useless.


That is part of my original post. Here is the updated version:

Links Plugin

When entering your site information in the config of the ACP, the ACP would save all info BUT the site logo url and the website url.
When viewing the link to us section on the links page the html worked great MINUS the site url and no logo would be injected in to the code. Example it would say :

Code: [Hide] [Select]
<a href="" target="_blank"><img src="" width="100" height="31" alt="What ever your site is" /></a>


Now the obvious problem with this is, the person linking back to your site would have bogus code. It would be useless without the image and url back to your website.

Problem solved!

I looked in the database and sure enough, in the ip_links_config table, the site_url and site_logo entries were missing thus the info was not being stored in the database.

To fix it:

OPEN plugins/links/install/install.php
FIND
Code: [Hide] [Select]
"INSERT INTO `" . $table_prefix . "link_categories` (`cat_id`, `cat_title`, `cat_order`) VALUES (8, 'News', 8);",

AFTER ADD
Code: [Hide] [Select]
"INSERT INTO `" . $table_prefix . "link_config` (`config_name`, `config_value`) VALUES ('site_logo', 'Site Logo URL Here');",
"INSERT INTO `" . $table_prefix . "link_config` (`config_name`, `config_value`) VALUES ('site_url', 'Your Site URL Here');",


EOM Close and save all files.

To fix a already working website (live production or test environment):

Enter ACP/DB and Security/IPMySQLAdmin

a new page will open. In the little box it says Query your Database: SQL and a yellow light bulb. Click the SQL Icon

It will open a box. In this box insert the following:

Code: [Hide] [Select]
"INSERT INTO `" . $table_prefix . "link_config` (`config_name`, `config_value`) VALUES ('site_logo', 'Site Logo URL Here');",
"INSERT INTO `" . $table_prefix . "link_config` (`config_name`, `config_value`) VALUES ('site_url', 'Your Site URL Here');",


Now press, submit Query. Wah lah! Your links plugin is now fixed. On the links.php page, your members will now see your site logo and when they copy the html to place on their site, all pertinent site info will be in place properly in the code ready for use.

Here is the screenshots:

This shows the missing fields in the database.
screenshot_8

The next one shows the fields not saved after submission.

screenshot_9

This one is of it fixed:

screenshot_10

Enjoy folks! As always, these fixes are not final. The final say is up to MG himself. This is what worked for me.


Mighty Gorgon [ Sat 20 Aug, 2016 23:40 ]
Post subject: Re: Links Plugin Errors And Fixes
Great suggestion and fix... I have implemented it on my local package... and I'll update on GIT on next commit.

Thank you very much.


MWE_001 [ Sun 21 Aug, 2016 04:51 ]
Post subject: Re: FIXED Links Plugin Errors And Fixes
No problem at all. Glad I was actually able to help and contribute to the community. I appreciate your including my fix.




Powered by Icy Phoenix