Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links Manager v1.01, please help???


panzz

Recommended Posts

I am getting 2 errors with the latest version

 

links_setup.php

Parse error: parse error, unexpected ',' in /home/xxxxx/public_html/links_setup.php on line 69

 

and when updating link info in the admin when button to update:

 

switch on action = update

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxx/public_html/admin/links.php:41) in /home/xxxxx/public_html/admin/includes/functions/general.php on line 85

 

 

Jimmy

Edited by RI Downlink

I'm not a coder just a splicer.

Link to comment
Share on other sites

  • Replies 245
  • Created
  • Last Reply

Top Posters In This Topic

I am getting 2 errors with the latest version

 

links_setup.php

Parse error: parse error, unexpected ',' in /home/xxxxx/public_html/links_setup.php on line 69

 

and when updating link info in the admin when button to update:

 

switch on action = update

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxx/public_html/admin/links.php:41) in /home/xxxxx/public_html/admin/includes/functions/general.php on line 85

Jimmy

 

 

Yeah...really nice to discover this AFTER you modify all the files <_<

 

What a pain

Edited by joeker
Link to comment
Share on other sites

Yeah...really nice to discover this AFTER you modify all the files  <_<

 

Yes there is a white space now in one of the new files that causes the error.

 

You can get support for this in the actual Links Mgr thread located HERE

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

Link to comment
Share on other sites

Yeah...really nice to discover this AFTER you modify all the files  <_<

 

What a pain

 

 

Hmmm.... It sounds like you and I are getting some of the same error...

 

I loaded the latest version of this cool links contrib to my website http://myhappydance.com. It works from the customers end, but when I try to add or update in the admin side it gives me this error.

 

switch on action = insert

 

Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/happydan/myhappydance.com/admin/links.php:41) in /hsphere/local/home/happydan/myhappydance.com/admin/includes/functions/general.php on line 18

 

:blush: Anybody have any idea how we can fix this?

 

[email protected].

Link to comment
Share on other sites

Hmmm.... It sounds like you and I are getting some of the same error...

 

I loaded the latest version of this cool links contrib to my website http://myhappydance.com.  It works from the customers end, but when I try to add or update in the admin side it gives me this error.

 

switch on action = insert

 

Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/happydan/myhappydance.com/admin/links.php:41) in /hsphere/local/home/happydan/myhappydance.com/admin/includes/functions/general.php on line 18

 

:blush:  Anybody have any idea how we can fix this?

 

[email protected].

 

OH!! I should have read your note first. I'll go to the link. Thanks.

Link to comment
Share on other sites

hi, ive posted this in another topic didnt realise this was here:

 

1ST POST

 

When i do step 3 "Fire up your browser and run /catalog/links_setup.php, to update your database." i keep getting the message "Parse error: parse error, unexpected ',' in /home/abdhqx/public_html/links_setup.php on line 69". Ive looked at the code but i only really have a basic knoledge of php so i might be missing something.

 

here are lines 68,69,70:

 

array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Link Title as links', 'TITLES_AS_LINKS', 'False', 'Make the links title a link.', '" . $configuration_group_id . "', '8', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"));

array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Links Category images', 'SHOW_LINKS_CATEGORIES_IMAGE', 'True', 'Display the images for the Links Categories.', '" . $configuration_group_id . "', '9', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),

array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Link Description', 'LINK_LIST_DESCRIPTION', '3', 'Do you want to display the Link Description?', '" . $configuration_group_id . "', '10', now())"),

 

2ND POST

 

i got it sorted, i had to replace the "," at the end of each line with a ";"

 

3RD POST

 

ok ive got a new problem now! lol

 

everything seemed to be going ok after the earlier problems. now when i go to the Link Manager admin page i get this error:

 

"Warning: Division by zero in /home/abdhqx/public_html/admin/includes/classes/split_page_results.php on line 33

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

 

This dosnt mean a thing to me!

 

Thanks again, Matt

 

 

Is this error due to me tampering with the code in the links_setup.php file?

 

I really havnt got a clue!

 

Cheers Matt

Link to comment
Share on other sites

ok ive got a new problem now! lol

 

everything seemed to be going ok after the earlier problems. now when i go to the Link Manager admin page i get this error:

 

"Warning: Division by zero in /home/abdhqx/public_html/admin/includes/classes/split_page_results.php on line 33

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

 

This dosnt mean a thing to me!

 

Thanks again, Matt

 

Matt, apparently you are running a version of php which can not handle a negative value for limit . Take a look at post # 66 in this thread. Jack_MCS has offered a sql statement that should correct the divide by zero problem

 

Philpoxon

Link to comment
Share on other sites

Another issue:  HOW DO YOU GET RID OF THE RECIPRICOL LINK REQUIRED!  ARGH! - I just want it not required but still listed...cant figure this out of rht life of me..

 

OR does anyone have a Links Manager that works effeciently?

 

S

 

 

ok did anyone solved this problem yet? I can't ad links without a reciprocating?

Link to comment
Share on other sites

My problem comes I think, in part from the fact that the latest post in the distribution of the Links Manager found here:

Links Manager link

 

has an incomplete table definitions sql script. Please check file contents of RECIPROCAL.SQL which I include here:

 

# Links Manager for OSC v0.2

#
# Table structure for table `exchange_links_categories`
#

CREATE TABLE exchange_links_categories (
 link_category_id int(11) NOT NULL auto_increment,
 link_category_name varchar(64) NOT NULL default '',
 link_category_description text,
 link_category_contact varchar(96) NOT NULL default '',
 link_category_email varchar(96) NOT NULL default '',
 link_category_rating int(11) default NULL,
 link_category_date datetime NOT NULL default '0000-00-00 00:00:00',
 link_category_status int(1) NOT NULL default '1',
 PRIMARY KEY  (link_category_id)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `exchange_links_links`
#

CREATE TABLE exchange_links_links (
 link_category_id int(11) NOT NULL default '0',
 link_id int(11) NOT NULL auto_increment,
 link_title varchar(255) NOT NULL default '',
 link_url varchar(255) NOT NULL default '',
 link_description text,
 link_contact varchar(96) NOT NULL default '',
 link_email varchar(96) NOT NULL default '',
 link_reciprocal varchar(255) NOT NULL default '',
 link_rating int(11) default NULL,
 link_date datetime NOT NULL default '0000-00-00 00:00:00',
 link_status int(1) NOT NULL default '1',
 PRIMARY KEY  (link_id,link_category_id)
) TYPE=MyISAM;

 

This code defines only 2 tables... Where are the rest of the tables for this contribution defined such as for instance the links_status table?

 

The following error I get is obviously caused by missing tables:

 

1146 - Table 'e_osc2.links_status' doesn't exist

select links_status_id, links_status_name from links_status where language_id = '1'

[TEP STOP]

 

What did I overlook in the set up ?

 

 

Thanks,

 

Stavin

Link to comment
Share on other sites

Never mind! I READ the instructions.. ahem. and ran the catalog/links_setup.php procedure. This created the database tables needed! So, please ignore my last post unless you find yourself in the same predicament. :)

 

Thank you all anyway for always helping!

 

Stavin

 

 

My problem comes I think, in part from the fact that the latest post in the distribution  of the Links Manager found here:

Links Manager link

 

has an incomplete table definitions sql script. Please check file contents of RECIPROCAL.SQL which I include here:

 

# Links Manager for OSC v0.2

#
# Table structure for table `exchange_links_categories`
#

CREATE TABLE exchange_links_categories (
?link_category_id int(11) NOT NULL auto_increment,
?link_category_name varchar(64) NOT NULL default '',
?link_category_description text,
?link_category_contact varchar(96) NOT NULL default '',
?link_category_email varchar(96) NOT NULL default '',
?link_category_rating int(11) default NULL,
?link_category_date datetime NOT NULL default '0000-00-00 00:00:00',
?link_category_status int(1) NOT NULL default '1',
?PRIMARY KEY ?(link_category_id)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `exchange_links_links`
#

CREATE TABLE exchange_links_links (
?link_category_id int(11) NOT NULL default '0',
?link_id int(11) NOT NULL auto_increment,
?link_title varchar(255) NOT NULL default '',
?link_url varchar(255) NOT NULL default '',
?link_description text,
?link_contact varchar(96) NOT NULL default '',
?link_email varchar(96) NOT NULL default '',
?link_reciprocal varchar(255) NOT NULL default '',
?link_rating int(11) default NULL,
?link_date datetime NOT NULL default '0000-00-00 00:00:00',
?link_status int(1) NOT NULL default '1',
?PRIMARY KEY ?(link_id,link_category_id)
) TYPE=MyISAM;

 

This code defines only 2 tables... Where are the rest of the tables for this contribution defined such as for instance the links_status table?

 

The following error I get is obviously caused by missing tables:

 

1146 - Table 'e_osc2.links_status' doesn't exist

select links_status_id, links_status_name from links_status where language_id = '1'

[TEP STOP]

 

What did I overlook in the set up ?

Thanks,

 

Stavin

Link to comment
Share on other sites

ok did anyone solved this problem yet? I can't ad links without a reciprocating?

You can't, without altering the code. The purpose of the contribution is mainly to help build your PR. PR depends totally on backlinks. So if you are adding all of your links wihtout having them link to you in return, it doesn't help at all (other than to have a links page for your customers I suppose).

 

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, I would use it for a proactive link campain. I would link to a site and then ask them to link to my site in return. Can you do that with this contribution? The results are usually better if they see you linked to them first. They are more likely to link to you.

Laser labels, barcode labels, custom labels

Link to comment
Share on other sites

In admin/links.php, try changing this

if (strlen($links_reciprocal_url) < ENTRY_LINKS_URL_MIN_LENGTH) {
         $error = true;
         $entry_links_reciprocal_url_error = true;
       } else {
         $entry_links_reciprocal_url_error = false;
       }

to this

$entry_links_reciprocal_url_error = false;
       

 

I haven't tried it but I think it will work.

 

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

Hey there,

 

I had a quick q about modifying the links listing page.

 

What i'm trying to do, is have the link image in one column, with the title in another, and underneath that is the description.

This is a very simple image of wat i mean:

link_layout.jpg

 

ANy ideas on if this is possible?

 

I've tried a couple of changes, and i've been able to get the description under the title, but it repeats in what was the Title and the Description colums... here

 

ANy ideas on what code changes i'd need to make to do this?

 

Cheers

Fatmcgav

Link to comment
Share on other sites

Hey there,

 

I had a quick q about modifying the links listing page.

 

What i'm trying to do, is have the link image in one column, with the title in another, and underneath that is the description.

This is a very simple image of wat i mean:

link_layout.jpg

 

ANy ideas on if this is possible?

 

I've tried a couple of changes, and i've been able to get the description under the title, but it repeats in what was the Title and the Description colums... here

 

Should be dead easy - look for the <tr> and <td> tags and move the WHOLE sections around (ie - everything inside the <tr> and </tr> markers and so on) until you get somewhere close to what you want. You can always add rows <tr>'s and columns within rows <td>'s but don't forget to end each one in the html with </tr> or </td>. You should get the layout you want like this.

 

Good luck

Link to comment
Share on other sites

i have installed this and all seemed to go great until i try to add a link on the site i get this error

 

Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10048) in C:\Domains\sharpsbooks.co.uk\wwwroot\shop\includes\functions\database.php on line 19
Unable to connect to database server!

 

the database seems to connect fine for everything else?

 

thanks

 

Mike

"because it'll hurt more"- the greatest film of all time?

Link to comment
Share on other sites

Should be dead easy - look for the <tr> and <td> tags and move the WHOLE sections around (ie - everything inside the <tr> and </tr> markers and so on) until you get somewhere close to what you want.  You can always add rows <tr>'s and columns within rows <td>'s but don't forget to end each one in the html with </tr> or </td>.  You should get the layout you want like this.

 

Good luck

If only it was that simple.

As far as i can tell, the columns are created from a sql query, and i cant remove the description field, as it removes both the column and the description itself...

 

Code taken from modules/links_listing.php

        switch ($column_list[$col]) {
         case 'LINK_LIST_TITLE':
           $lc_align = '';
           if (LINKS_TITLES_AS_LINKS == 'True')
             $lc_text = $listing['links_title'];
           else
             $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . $listing['links_title'] . '</a><br>' . $listing['links_description'];
           break;
         case 'LINK_LIST_URL':
           $lc_align = '';
           $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) .  '" target="_' . $openMode . '">' . $listing['links_url'] . '</a>';
           break;
         case 'LINK_LIST_IMAGE':
           $lc_align = 'center';
           if (tep_not_null($listing['links_image_url'])) {
             $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) .  '" target="_' . $openMode . '">' . tep_links_image($listing['links_image_url'], $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT) . '</a>';
           } else {
             $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) .  '" target="_' . $openMode . '">' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT, 'style="border: 3px double black"') . '</a>';
           }
           break;
         case 'LINK_LIST_COUNT':
           $lc_align = '';
           $lc_text = $listing['links_clicked'];
           break;
       }

The change i made is moving $listing['links_description'] from it's own case to the title case, but i still cant seem to remove the descritpion column...

 

Any ideas ppl?

 

Cheers

Fatmcgav

Link to comment
Share on other sites

If only it was that simple.

As far as i can tell, the columns are created from a sql query, and i cant remove the description field, as it removes both the column and the description itself...

 

Code taken from modules/links_listing.php

        switch ($column_list[$col]) {
         case 'LINK_LIST_TITLE':
           $lc_align = '';
           if (LINKS_TITLES_AS_LINKS == 'True')
             $lc_text = $listing['links_title'];
           else
             $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . $listing['links_title'] . '</a><br>' . $listing['links_description'];
           break;
         case 'LINK_LIST_URL':
           $lc_align = '';
           $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) .  '" target="_' . $openMode . '">' . $listing['links_url'] . '</a>';
           break;
         case 'LINK_LIST_IMAGE':
           $lc_align = 'center';
           if (tep_not_null($listing['links_image_url'])) {
             $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) .  '" target="_' . $openMode . '">' . tep_links_image($listing['links_image_url'], $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT) . '</a>';
           } else {
             $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) .  '" target="_' . $openMode . '">' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT, 'style="border: 3px double black"') . '</a>';
           }
           break;
         case 'LINK_LIST_COUNT':
           $lc_align = '';
           $lc_text = $listing['links_clicked'];
           break;
       }

The change i made is moving $listing['links_description'] from it's own case to the title case, but i still cant seem to remove the descritpion column...

 

Any ideas ppl?

 

Cheers

Fatmcgav

 

All sorted :D:D

I noticed some sql queries on the main links.php page, so i just commented a line out, and reshuffled a couple of fields, and it now seems to work fine.

 

Cheers

Fatmcgav

Link to comment
Share on other sites

Heyo all :)

 

I have installed now latest version of this great contrib.

 

All working fine here now, but...

 

in admin i have gave every categorie a categorie image,

and the link manager don?t show now the images in the shop.

(catalog/links.php)

 

What i have to do, or change, that users see that images again ?

 

Thanks in advance

Hobbes

Link to comment
Share on other sites

Is there a way to change the link on the links page from a redirect? Any new link I put in works as a redirect. On the mouse over it shows http://www.mysite.com/redirect.php?action=links&goto=1

 

Should be easy, but I could not find it in this thread.

 

 

I just figured out that in the admin setting I can turn off the click count and it works. I would think the redirect would not be as preferable as the direct link. Is that true?

Laser labels, barcode labels, custom labels

Link to comment
Share on other sites

Thanks for this great contribution!!!

 

I installed it and it works great except I can't get the links to work. the error it pulls is

Parse error: parse error, unexpected T_CASE

 

The line it is looking for in redirect.php is

case 'links':

 

I have zero idea what to do. I have redone the redirect.php step several times but no luck. Is there something else I could have missed along the way???

 

My site is www.replaykids.com/catalog/

 

Thanks so much

Link to comment
Share on other sites

Hello Geekster, :)

 

my Link Manager works great, i have installed latest Version.

And all works fine here solong.

 

Please make a Backup from your redirect.php and try this code :

 

<?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;
     
     // 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
 }

 tep_redirect(tep_href_link(FILENAME_DEFAULT));
?>

 

Let me know, that it works or not ;)

 

Cheers

Hobbes

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...