Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Links Manager for osC v1.00


VJ

Recommended Posts

I find it funny.  I have a test oscommerce set up and then an additional 2 stores.  I had version 1.01 installed and am upgrading to v 1.07It amazes me how installing the same contribution on all 3 can get such different results.

 

I made the database change to 'Display Link Titles as Links' It appeared in my admin configuration.  I set it to True - but the links wont appear as Links on my store.

 

Everything works fine except this.

 

What file have I missed on? - I uploaded all the new files for 1.07

(so I went and added the code to the database again, thinking that was wrong, now I have 2 links for the Link Titles in Admin * will that cause a problem?

Check your includes/modules/link_listing.php file and make sure you have this code
  if (LINKS_TITLES_AS_LINKS == 'True')
             $lc_text = $listing['links_title'];
           else
             $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_blank">' . $listing['links_title'] . '</a>';
     

. If not, you have the wrong file.

 

The duplicate items in the database should be deleted.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

That's caused by a statement I was using for working on the code. I serves no purpose now. It doesn't hurt anything being in there except for the message it displays. If you open admin/links.php and loot line 41 your should see
 echo 'switch on action = '.$action.'<br>';

Just delete that line to remove it.

 

Jack

 

 

Hi Jack,

 

I went through and cleaned out all the white spaces and my problem did not go away. But when I deleted the line above, my error went away. Yah! This is a great contrib. Thanks a bunch!

 

[email protected]

Link to comment
Share on other sites

I have 2 of my 3 stores set up now. Thank you for bearing with me.

 

I went to set up the third store and did the 2 sql changes first - I havent uploaded my new files yet. It put 10-11 lines for each in my admin for my admin configuration. I only hit the go once (in myphpadmin) - I dont understand how I could have done that - but I seem to be doing odd things with this contribution - :-)the extra lines didnt happen with the other 2 setups.

 

I had previously (a couple of weeks ago) added the max links via sql myphpadmin for this last store and it shows 10 or 11 for that as well.

 

Can you please tell me where in myphpadmin, I go and delete the unwanted duplicate lines please ?

 

(I am sorry, I am being quite a problem child with this contribution :-)

Link to comment
Share on other sites

The duplicates are most likely in the configuration table.

 

First, go to admin->tools and backup youu database. This could be the only thing that saves you if a mistake is made so be sure to not skip this step. Then select your database and then the configuration table in the left column. In the right column, select the browse tab. Where it says Show 30, if you change that to 300, it will be easier to do the following but is not required. Scroll down and look for the duplicate fields. You should select the ones that are father down the list since they would be the ones added later. Select the X for that line and it will ask you if you want to delete it, click OK.

 

There's no reason to apologize. I created the problem origihnally by not including an update script. I normally do that but I just forgot to do it on this one.

 

Jack

Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack,

 

first I want to say thanks for great contrib and all your hard work!

 

I've installed your latest version and everything went fine. But in my admin section under Links, I've the following error:

 

1064 - 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 'MAX_LINKS_DISPLAY' at line 1

 

select l.links_id, l.links_url, l.links_image_url, l.links_date_added, l.links_last_modified, l.links_status, l.links_clicked, ld.links_title, ld.links_description, l.links_contact_name, l.links_contact_email, l.links_reciprocal_url, l.links_status from links l left join links_description ld on l.links_id = ld.links_id where ld.language_id = '1' order by ld.links_title limit 0, MAX_LINKS_DISPLAY

 

I've been searching this thread and even attempted the following in my SQL:

 

INSERT INTO  configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Maximum Links to Display', 'MAX_LINKS_DISPLAY', '20', 'How many links should be displayed per page?', '18', '15', now())

Replace the 18 above with the number you wrote down above.

 

SQL query was executed and line inserted...

 

Perhaps I missed something...?

 

Can you help please?

 

Alex

Absinthe Original Liquor Store

Link to comment
Share on other sites

First, I thank you but, to be clear, this is not my contribution. I merely made some updates.

 

As for your problem, you are getting the error because it is missing the field in the database. I'm not sure why that is so if you used the latest version but it doesn't matter at this point.

 

Try this:

Go into phpmyadmin, select your database and then select the Search tab.

Type Link into the search string and select the Configuration table from the list of tables.

Click Go. It should return with the number of items found with a Browse buton beside it.

Click on that.

Find one of the items that you know belongs to Link Manager like ENABLE_LINKS_COUNT. Scroll over to the column labeled configuration_group_id and note the number there. Then look at all of the other entries (if you click on that columns title it will sort on it making it easier to view). You should 17 entries for that number. You can compare their names to what's in the links_setup.php file to see what is missing.

 

If you find one that is missing, then it needs to be added. Use the procedure you used before except copy the line from the links_setup file. If you get to that point and have trouble with it, just ask here.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack,

 

thanks for your timely reply.

 

I repeated few steps, double checked my db, compared entries, deleted accidentaly inserted rows and all's fine now.

 

I know it's not your contribution, but you did some valuable updates, other contributions and people like you are making osC what it is these days, great shopping cart.

 

Alex

Absinthe Original Liquor Store

Link to comment
Share on other sites

Ok, I got through most everything without much trouble. Would have been fine with a clean install I'm sure. However I have one thing haunting me.

 

Warning: main(includes/modules/FILENAME_LINK_SEARCH): failed to open stream: No such file or directory in /home/webadmin/far-horizons.biz/html/OSCommerce/catalog/links.php on line 287

 

Warning: main(): Failed opening 'includes/modules/FILENAME_LINK_SEARCH' for inclusion (include_path='.:/usr/share/pear') in /home/webadmin/far-horizons.biz/html/OSCommerce/catalog/links.php on line 287

 

 

I defined FILENAME_LINK_SEARCH as link_search.php and verified that the file is in fact in the includes/modules directory so the obvious (to me at least) is out of the way. Any help?

 

BTW, I think it's some really great work on the mods.

Link to comment
Share on other sites

What this contribution needs is some way to manualy add links that are tagged as waiting for reciprocal link. Because when you are looking for link partners you add their link to your site first. So you don't know what the reciprocal link url will be till they link back to you. It also needs to be able to have a way to put those waiting for reciprocal links on hold / suspended after a set time period.

 

That way you can add lots of links, send out the reciprocal requests, and if you haven't heard back within a week, their link is auto suspended and they are emailed with a message that no reply was recieved and their link is suspended till notice is recieved. this way your link pages don't fill up with junk links that are seeping page rank from your site for no return. :(

 

At the moment theres no easy way of using this contribution as a reciprocal link manager without a link being given to you first.

 

It's definatly something that needs looking at so that we can use it to it's full potential.

 

p.s please look at my links page ideal links is their a way to get the category title above the category description? As it's currently displaying at the side. Also has anyone managed to get the page title to display correctly for each category, as mine all just say 'links'

Edited by Rochdalemark
Link to comment
Share on other sites

We started a wish list (oh back about 50 posts ago) maybe you want to add some of your idea's to it and repost it?

 

[admin side]

_X_search box for existing links that searchs just the links DB .. Really needed when a link partner visits site looking for his/her link. 1/2 Completed.. Thanks goto Jack!

_X_button to show links that need to be Approved (pending new submits) Completed.. Thanks goto Jack!

_X_button to show what links are currently Disabled Completed.. Thanks goto Jack!

___ability to display links by date (as oldest first or newest first) added and also as (current) alphabetically

_X_ability to change the number of links as displayed per page Completed... Thanks goto Jack!

___ability to change how links open (in new or existing window)

_X_ability to show picture links in Category or not. Completed.. Thanks goto Jack!

___subcategories? would be nice to many users.

___ability to automatically email ALL none linking partners

__spider option to crawl site rather than just location to see if link has been moved

_X_button for spidering all active link partners to check reciprocation Completed.. Thanks goto Jack!

___button for spidering inactive partners (hey, they might have your link back up?)

___date or frequecy field for automatic "send out" spidering. Setting up a Cron to do this in the middle of the night is optimal

___arrangement of link option, side by side (like now) or over and under (link title on top, description underneath, picture to the left would be a nice listing (look).

 

[user side]

_X_Link count on Categories i.e. Automotive ( 36 ) Arts ( 14 ) Business ( 116 ) etc... Completed.. Thanks goto Jack!

_X_site title linked as anchor text (actual link) and maybe switchable in admin as only the sites picture or the actual url is a link. Completed.. Thanks goto Jack!

___mouseover script the displays actual link in browser instead of redirect link (when using link count, actual link should display on mouseover).

___date added on link listing, maybe a small dim italic font? (switchable in admin)

___reciprocal link details on link submit page (admin interface should configure input box so webmaster can have reciprocal details input in links_submit.php)

___same as above but for a list of new link additions (newest 5?)

 

So far as you see, Jack has been hammering these out 1 by 1. Hats off, great work on a great contrib.

--KJ

define('PROJECTS', 'Something that goes on forever!');

Link to comment
Share on other sites

Thanks KJ. :) I have uploaded a new version.

 

- Added option to allow opening links in new page or not

- Changed code to display link count beside the category name and the description below it

- Added Waiting option to links in admin. If Waiting is selected, a recipricol link is not required.

- Changed code to display category count correctly. It was displaying the count of all links in a category instead of just the Approved ones.

 

It just dawned on me while typing the above that Waiting links won't display since I didn't change the code for that. To make that change, find the following in catalog/links.php

 $listing_sql = "select " . $select_column_list . " l.links_id from " . TABLE_LINKS_DESCRIPTION . " ld, " . TABLE_LINKS . " l, " . TABLE_LINKS_TO_LINK_CATEGORIES . " l2lc where l.links_status = '2' and l.links_id = l2lc.links_id and ld.links_id = l2lc.links_id and ld.language_id = '" . (int)$languages_id . "' and l2lc.link_categories_id = '" . (int)$current_category_id . "'";

and change it to

  $listing_sql = "select " . $select_column_list . " l.links_id from " . TABLE_LINKS_DESCRIPTION . " ld, " . TABLE_LINKS . " l, " . TABLE_LINKS_TO_LINK_CATEGORIES . " l2lc where ( l.links_status = '2' or l.links_status = '4' ) and l.links_id = l2lc.links_id and ld.links_id = l2lc.links_id and ld.language_id = '" . (int)$languages_id . "' and l2lc.link_categories_id = '" . (int)$current_category_id . "'";

Then find

   $categories_count_query = tep_db_query("select l.links_id, l.links_status, lc.links_id, lc.link_categories_id from " . TABLE_LINKS . " l, " . TABLE_LINKS_TO_LINK_CATEGORIES . " lc where l.links_id = lc.links_id and l.links_status = 2 and lc.link_categories_id = " . $categories['link_categories_id']);
 

and change it to

     $categories_count_query = tep_db_query("select l.links_id, l.links_status, lc.links_id, lc.link_categories_id from " . TABLE_LINKS . " l, " . TABLE_LINKS_TO_LINK_CATEGORIES . " lc where l.links_id = lc.links_id and ( l.links_status = 2 or l.links_status = 4) and lc.link_categories_id = " . $categories['link_categories_id']);

 

I think that will make everything work correctly.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Scroll over to the column labeled configuration_group_id and note the number there.

Replace the number 444 in the following with that number and then add the update.

 

 

 

Trying to update and I do not see 444 and am not clears as what to do. Am I a version too far behind to update this way? Do I need to just re-install. I don't want to loose any link pages that I have because of course I'll loose my backlinks for not existing recirocal links.

 

What do I need to do

Link to comment
Share on other sites

Here is the instruction you are referring to:

Replace the number 444 in the following with that number and then add the update.

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Links open in new page', 'LINKS_OPEN_NEW_PAGE', 'True', 'Open links in new page when clicked.', '444', '17', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())

See the 444 now?

 

There were other updates before this last one and most, if not all, had database changes. So depending on which version you are using, you may have to make additional changes to the database. There's no reason to have to start all over though.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Toys & Things Links Page

 

ok I'm lost again. I started to update and I get to

 

$categories_count_query = tep_db_query("select link_categories_id from " . TABLE_LINKS_TO_LINK_CATEGORIES . " where link_categories_id = " . $categories['link_categories_id']);

 

Which does not exist in that file

also note I am using links.tpl.php which should not matter ? all the other updates I made were ok

 

Where do I start to fix this?

 

and my links page does not work anymore

 

Parse error: parse error in /var/www/html/catalog/includes/modules/link_listing.php on line 106

Link to comment
Share on other sites

I have the contribution "links manager" and I will want to insert flash image.

Thanks for your help.

:blush:

I don't use flash but I believe you add the link to flash file the same you would for a regular image. Have you tried that?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Toys & Things Links Page

 

ok I'm lost  again. I started to update and I get to

 

  $categories_count_query = tep_db_query("select link_categories_id from " . TABLE_LINKS_TO_LINK_CATEGORIES . " where link_categories_id = " . $categories['link_categories_id']);

 

Which does not exist in that file

also note I am using links.tpl.php which should not matter ? all the other updates I made were ok

 

Where do I start to fix this?

 

and my links page does not work anymore

 

Parse error: parse error in /var/www/html/catalog/includes/modules/link_listing.php on line 106

Are you referring to the update instructions in the latest version? If so, then that is for code that was added in an eariler version. You will need to install the earlier changes first to get to a point to that the instruction file will work. Unfortunately, the versions came out in very quick succession and the update instructions were not included as they should have been. I posted some update instructions in this thread and some in the thread we are currently in.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Everyone,

 

I installed this great contribution, it seems it is working well, but one thing is not working.

In admin page and links manager, Check Links button does not work at all.

right coloum button (check link) also does not work either. it keep giving me

either this Link Check Result: Not Found or "X test" gif picture.

 

please teach me how to use check links button and make it works

 

Thasnks,

 

Jay

Link to comment
Share on other sites

I don't use flash but I believe you add the link to  flash file the same you would for a regular image. Have you tried that?

 

Jack

 

Yes, I tested that but the flash doesn't appear. It is necessary to insert :

<object><embed></embed></object>

at the place where it put the image for see the flash.

Link to comment
Share on other sites

Jack,

 

I'm experiencing some difficulties with different languages. Everything seems to be fine in English version (I've been inserting all links in English), however if you switch language, the links categories are empty, even in admin. However all categories entered in English are available in other languages... Don't really know what to do at the moment, all language files have been inserted in all languages... Have a look here please.

 

Regards,

 

Alex

Absinthe Original Liquor Store

Link to comment
Share on other sites

Hi Everyone,

 

I installed this great contribution, it seems it is working well, but one thing is not working.

In admin page and links manager,  Check Links button does not work at all.

right coloum button (check link) also does not work either. it keep giving me

either this Link Check Result: Not Found  or "X test" gif picture.

 

please teach me how to use check links button and make it works

 

Thasnks,

 

Jay

To use the Check Link button, you just click on the link you want to check and then click on the Check Loink button. If it is saying Not Found, then that means just that - the link to your site could not be found on the other site. Be sure that the Links Checks Phase in admin->configuration->Links is set properly. That is what the Check Links button is searching for on the other site so if it is not correct, then it will never find it.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Yes, I tested that but the flash doesn't appear. It is necessary to insert :

<object><embed></embed></object>

at the place where it put the image for see the flash.

You probably need to alter the code in includes/modules/link_listing.php so that it recognizes the flash then.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...