Jump to content
Sign in to follow this  
VJ

[Contribution] Links Manager for osC v1.00

Recommended Posts

Me again. I have another problem. After uploading to my webhost everything works OK except when clicking on the url link in the links page (that should go to the person's website), the page loads back to my home page.??? It doesn't do this when testing it on my localhost. What has changed? All the links files are exactly the same as they are on my localhost.


Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Share this post


Link to post
Share on other sites

Ignore the above post. I have sorted the problem. I had omitted the redirect.php file on the webhost! :blink:


Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Share this post


Link to post
Share on other sites
Ignore the above post. I have sorted the problem. I had omitted the redirect.php file on the webhost! :blink:

:huh: For those that have the same problem...can you explain what you did to fix it in details? Thanks :)

Share this post


Link to post
Share on other sites

I had just forgotten to upload the new redirect.php page that came with the contrib.


Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Share this post


Link to post
Share on other sites
I had just forgotten to upload the new redirect.php page that came with the contrib.

:o Thanks, cause I did the same thing.

Share this post


Link to post
Share on other sites

I get this error while trying to view what is in the category from the website:

 

1146 - Table 'spycamg_osc1.TABLE_LINKS_TO_LINK_CATEGORIES' doesn't exist

 

select count(l.links_id) as total from links_description ld, 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 = '1' and l2lc.link_categories_id = '1'

 

[TEP STOP]

 

Please NOTE: that admin works just fine, I can add categories and links.

Also the site lists categories fine, just when I got into them to see link i get this error.

 

Also NOTE: that I checked phpmyadmin and that table does exist.

 

Any help is appreciated been searching the forums for 2 days with no luck.

Share this post


Link to post
Share on other sites
call to undefined function: tep_validate_email() in admin/links.php on line 83.

I have this same problem too, since i used MS1

 

anybody has idea how to fix this?

 

I am trying to get this contr. works with MS1, so i will upload to contr. section if i figure out and fix problems.

 

 

thanks

 

John

Edited by minghoo

Share this post


Link to post
Share on other sites

call to undefined function: tep_validate_email() in admin/links.php on line 83.

I have this same problem too, since i used MS1

 

anybody has idea how to fix this?

 

I am trying to get this contr. works with MS1, so i will upload to contr. section if i figure out and fix problems.

 

 

thanks

 

John

as the error message states the tep_validate_email_function has not been defined in admin/includes/functions/validations.php


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

Thank you so much for replying.

 

 

Could you please tell me how to get this working?

 

these links: ( 83- 88 ) in admin/links.php

 

if (!tep_validate_email($links_contact_email)) {

$error = true;

$entry_links_contact_email_check_error = true;

} else {

$entry_links_contact_email_check_error = false;

}

 

 

how can i define this $links_contact_email function?

 

 

thanks

john

Share this post


Link to post
Share on other sites

Sorry I do not use MS1 so do not know if there is a admin/includes/functions/validations.php file or a catalog/includes/functions/validation file

 

If these files exist then that is where to define the function


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

you could try copying the validation.php file from a 2.2MS2 as the file is only used to check the email address character formation or bypass the validation part of the code in links


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites
I get this error while trying to view what is in the category from the website:

 

1146 - Table 'spycamg_osc1.TABLE_LINKS_TO_LINK_CATEGORIES' doesn't exist

 

select count(l.links_id) as total from links_description ld, 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 = '1' and l2lc.link_categories_id = '1'

 

[TEP STOP]

 

Please NOTE: that admin works just fine, I can add categories and links.

Also the site lists categories fine, just when I got into them to see link i get this error.

 

Also NOTE: that I checked phpmyadmin and that table does exist.

 

Any help is appreciated been searching the forums for 2 days with no luck.

Anyone have any clue for this?

 

Been couple weeks and I still cannot solve this problem.

 

Went thru the setup instructions 5 times and all looks right.

Share this post


Link to post
Share on other sites

In /includes/database_tables.php add:

 

define('TABLE_LINKS_TO_LINK_CATEGORIES', 'links_to_link_categories');


It ain't your grandma's box!

Share this post


Link to post
Share on other sites

Thanks! I actually had it there, but for somre reason I had put an extra letter in there, from using keyboard shortcuts I guess.

Share this post


Link to post
Share on other sites

I have been exchanging links using the Links Manager and have received an email from someone saying no thanks they don't want my link because it is "a cgi generated link and search engines do not treat cgi links as reciprocal links".

 

Is this the case and if so, is there a way of changing the links to display as search engine friendly links?

 

A sample of one of my links page is at My Webpage

 

When you mouseover the link, it shows as a generated link. :huh:


Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Share this post


Link to post
Share on other sites

Hi,

 

Have been enjoying myself installing this brilliant contribution (many thanks for writing it). I have been following the path of some others trying to install it onto a pre ms2 version of OSC. All was going well until I hit a problem that hasn't been mentioned. so I'm hoping someone can cure this for me. I'm a definate beginner with php so please be kind :)

 

The admin side is fine now, its just the 'submit a site' file

 

It displays fine(ish) apart from the line:-

 

Website Details FORM_REQUIRED_INFORMATION , I'm assuming that the 'FORM_REQUIRED_INFORMATION' bit is some type of variable/label which has to be defined somewhere?

 

also all the 'Help [?]' java links don't work.

 

Apart from this all is ok, the site submission works fine

 

Would really appreciate some help with this, many thanks in anticipation

 

Len

Share this post


Link to post
Share on other sites
I?m running into a problem, too. The installation worked fine, and I can add categories and links and they are all saved in the proper tables (as I can see via phpMyAdmin). But when I go to the catalog and call the section "links", only the link categories are shown, but no links!

 

Also, in the admin section, there is no entry offer for [option ->] status.

 

Any ideas what I?m doing wrong?

Thanks in advance!

 

No idea at all. I have the first problem you have, though I do have the status buttons showing up correctly. I'm preparing to uninstall all my links and try to reenter them As no one seems to have responded to this issue. If that doesn't work, it a complete uninstall for me.

 

David

Share this post


Link to post
Share on other sites

Hi Again,

 

Both previous problems still exist, anyone have any ideas? Please

 

developed another one, i think its down to this contribution, but not sure, the error i have now is down to the quick search or advanced search, the error i get is:-

 

1064 - You have an error in your SQL syntax near 'select distinct p.products_image, m.manufacturers_id, p.products_id, pd.product' at line 1

select count(select distinct p.products_image, m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where p.products_status = \'1\' and p.products_id = pd.products_id and pd.language_id = \'1\' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like \'%jade%\' or p.products_model like \'%jade%\' or m.manufacturers_name like \'%jade%\') ) order by pd.products_name) as total 

[TEP STOP]

 

Anyone know if this is or could be down to this contribution, my site is live so it would be really nice to have a search facility

 

Help!!

 

regards

 

len

Share this post


Link to post
Share on other sites

Hello all,

 

I have installed this contribution. Everything seems to work fine except the actual link to the link partner.

 

I recieve the following error when I click the link:

Parse error: parse error, unexpected $ in /hsphere/local/home/scot0/corshas.com/catalog/redirect.php on line 75

 

 

The problem is that there is not a line 75

 

<?php
/*
 $Id: redirect.php,v 1.10 2003/06/05 23:31:31 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 switch ($HTTP_GET_VARS['action']) {
   case 'banner':
     $banner_query = tep_db_query("select banners_url from " . TABLE_BANNERS . " where banners_id = '" . (int)$HTTP_GET_VARS['goto'] . "'");
     if (tep_db_num_rows($banner_query)) {
       $banner = tep_db_fetch_array($banner_query);
       tep_update_banner_click_count($HTTP_GET_VARS['goto']);

       tep_redirect($banner['banners_url']);
     }
     break;

   case 'url':
     if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {
       tep_redirect('http://' . $HTTP_GET_VARS['goto']);
     }
     break;

   case 'manufacturer':
     if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
       $manufacturer_query = tep_db_query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");
       if (tep_db_num_rows($manufacturer_query)) {
// url exists in selected language
         $manufacturer = tep_db_fetch_array($manufacturer_query);

         if (tep_not_null($manufacturer['manufacturers_url'])) {
           tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");

           tep_redirect($manufacturer['manufacturers_url']);
         }
       } else {
// no url exists for the selected language, lets use the default language then
         $manufacturer_query = tep_db_query("select mi.languages_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_LANGUAGES . " l where mi.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and mi.languages_id = l.languages_id and l.code = '" . DEFAULT_LANGUAGE . "'");
         if (tep_db_num_rows($manufacturer_query)) {
           $manufacturer = tep_db_fetch_array($manufacturer_query);

           if (tep_not_null($manufacturer['manufacturers_url'])) {
             tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$manufacturer['languages_id'] . "'");

             tep_redirect($manufacturer['manufacturers_url']);
           }
         }
       }
     }
     break;
tep_redirect(tep_href_link(FILENAME_DEFAULT));
// VJ Links Manager v1.00 begin
   case 'links':
     require(DIR_WS_FUNCTIONS . 'links.php');

     $links_query = tep_db_query("select links_url from " . TABLE_LINKS . " where links_id = '" . (int)$HTTP_GET_VARS['goto'] . "'");
     if (tep_db_num_rows($links_query)) {
       $link = tep_db_fetch_array($links_query);
       tep_update_links_click_count($HTTP_GET_VARS['goto']);

       tep_redirect($link['links_url']); 
     }
     break;
// VJ Links Manager v1.00 end
?>

 

 

I think that the problem has to be this line of code,

 tep_redirect($link['links_url']);

though I don't see the problem.

 

Thanks for the help,

Scott

Share this post


Link to post
Share on other sites
I?m running into a problem, too. The installation worked fine, and I can add categories and links and they are all saved in the proper tables (as I can see via phpMyAdmin). But when I go to the catalog and call the section "links", only the link categories are shown, but no links!

 

Also, in the admin section, there is no entry offer for [option ->] status.

 

Any ideas what I?m doing wrong?

Thanks in advance!

 

No idea at all. I have the first problem you have, though I do have the status buttons showing up correctly. I'm preparing to uninstall all my links and try to reenter them As no one seems to have responded to this issue. If that doesn't work, it a complete uninstall for me.

 

David

 

 

Ok. Fixed it. During an upgrade of my site, some extra whitespace had made it into catalog/includes/categories_tab.php and this munged the link display.

Edited by Nimitz_1061

Share this post


Link to post
Share on other sites

Hi - some of my links partners are not happy with the redirect as they claim that this is not counted as a link by the search engines.

 

I have looked at the code and I can see that the actual links_url is presented to the bots depending on whether or not they are caught by the spiders.txt - - the only thing I am not sure about is why we need to redirect in the first place.

 

Is there any reason for this - surely its better just to present the url ?? Anyone got any comments

 

Thanks

Stuart

Share this post


Link to post
Share on other sites

If anyone needs it, I just uploaded an addon that will allow printing of the links. The contribution is HERE. I still want to add sorting and selective page printing to it but it will be awhile before I can get to it so I put it up as is for now.

 

Jack

Share this post


Link to post
Share on other sites

Stuart, See my previous post under this. I have the same problem as you. Still looking for a reply. Anyone have any answers? Why can't the links just show up as ordinary links when mouseover?

 

I have been exchanging links using the Links Manager and have received an email from someone saying no thanks they don't want my link because it is "a cgi generated link and search engines do not treat cgi links as reciprocal links".

 

Is this the case and if so, is there a way of changing the links to display as search engine friendly links?

 

A sample of one of my links page is at My Webpage

 

When you mouseover the link, it shows as a generated link


Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Share this post


Link to post
Share on other sites

Hi Mary

 

Making the change is (or looks to be) quite simple - there is a function file called links.php which controls this, we could either change the function to list the url on mouseover or delete the function in the link listing and rewrite that file instead. I'll do that if I don't get an answer as to why would someone go to the lengths of programming the redirect if there was no reason for it - I'll post the solution here if I do that.

 

I'm guessing that the redirect is to stop unwanted harvester robots going to the link partners site and spamming them to death - which is in their benefit really ... but then some link partners are quite adamant that they don't want to link with redirected url's so we're in a catch 22 there

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×