Jump to content
Sign in to follow this  
VJ

[Contribution] Links Manager for osC v1.00

Recommended Posts

okay never mind. all the errors seemed to be hinged on the fact that the categories database was empty. I used myphpadmin to add a row to the links categories and categories description tables and everything appears to be working now.

 

I may be on the wrong track, but are you saying that by manually adding rows to to the two tables you fixed the following?

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in d:\InetPub\wwwroot\clientwebspace\www.happyhorsesupplies.co.uk\admin\links.php on line 733

 

Warning: reset() [function.reset]: Passed variable is not an array or object in d:\InetPub\wwwroot\clientwebspace\www.happyhorsesupplies.co.uk\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in d:\InetPub\wwwroot\clientwebspace\www.happyhorsesupplies.co.uk\admin\includes\classes\object_info.php on line 18

 

Thanks!

Share this post


Link to post
Share on other sites
This is what i find when trying to see my testlink, any ideas how to change that?

 

Hi, I am facing the same error when i try to go inside the categories to view the links. Did anyone find a fix for this problem?

 

Below is our list of links for the Your category.

 

1064 - You have an error in your SQL syntax near 'xor ld.language_id = '99')' at line 1

 

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

 

[TEP STOP]

 

Can anyone help pls?

Edited by mario.banderos

Share this post


Link to post
Share on other sites

I copied the above mysql command into phpmyadmin and it ran fine. So the problem might be related to the version of mysql you are using, assuming the contribution is installed correctly.

 

Jack

Share this post


Link to post
Share on other sites

Hi folks,

 

 

Thank you for this contribution - it looks quite nice and is very easy to use.

 

I've just installed it and it works perfectly...except, when I click on Links it takes me to the link categories page. This loads up nice and quickly but there is a warning trying at the bottom left in my browser telling me there's an error... here are the details:

 

Line: 341

Char: 1

Error: Object Expected

Code: 0

url: http://www.vintagevibrations.com/catalog/l...=XXXXXXXXXXXXXX

 

When I click on a category, the links for that category load up VERY slowly. The do eventually display and everything looks fine. The browser error when clicking on the warning triangle is now this:

 

Line: 368

Char: 1

Error: Object Expected

Code: 0

url: http://www.vintagevibrations.com/catalog/l...=XXXXXXXXXXXXXX

 

Any help with this would be greatly appreciated,

 

Thanks,

 

Jody

Share this post


Link to post
Share on other sites

There's no warning here. That is a javascript error. You can disable the warnings in IE's toolbar. The setting is normally only used for testing scripts, not for normall browsing.

 

Jack

Share this post


Link to post
Share on other sites
There's no warning here. That is a javascript error. You can disable the warnings in IE's toolbar. The setting is normally only used for testing scripts, not for normall browsing.

 

Jack

 

Thanks a million for that Jack... that actually gave me enough information to get rid of the error... was missing some java script for a contribution I have installed.

 

Thanks a gain,

 

Jody

Share this post


Link to post
Share on other sites

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in d:\InetPub\wwwroot\clientwebspace\www.happyhorsesupplies.co.uk\admin\links.php on line 235

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in d:\InetPub\wwwroot\clientwebspace\www.happyhorsesupplies.co.uk\admin\links.php on line 235

Warning: reset() [function.reset]: Passed variable is not an array or object in d:\InetPub\wwwroot\clientwebspace\www.happyhorsesupplies.co.uk\admin\includes\classes\object_info.php on line 17

Warning: Variable passed to each() is not an array or object in d:\InetPub\wwwroot\clientwebspace\www.happyhorsesupplies.co.uk\admin\includes\classes\object_info.php on line 18

 

This contribution looks fantastic and when it's working should make my life that much easier! Can anyone help direct me with the errors above?

 

Thanks!

 

Happy Horses Supplies

Share this post


Link to post
Share on other sites

That is problem a php version related problem. Try locating this code, at line 235 in admin/links.php

$lInfo_array = array_merge($links, $category);

and change it to

$lInfo_array = array_merge((array)$links, (array)$category);

I don't know that it will fix it but I know there was a bug in one version of php that could be sidestepped that way.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack... got another curiosity....

I got the contrib installed and it looks real nice thank you.

 

when I go to one of my links listings pages the table it creates with the links in it has the following header:

 

TITLE+ DESCRIPTION URL CLICKS

 

there's a few things here puzzling me...

I looked where the text for these headings are defined and not only is the + after TITLE most definately NOT there I have no idea where it's coming from. I did notice however that the text used for these headings is too big for it to fit neatly into the boxes at the tops of the columns like they're supposed to as well as not lining up correctly.

 

I was playing around with the code and I did this:

 

in link_listing.php where it says:

 

$list_box_contents[0][] = array('align' => $lc_align,

'params' => 'class="linkListing-heading"',

'text' => ' ' . $lc_text . ' ');

 

I changed it to say:

$list_box_contents[0][] = array('align' => $lc_align,

'params' => 'class="linkListing-heading"',

'text' => 'title');

 

 

then what I got was the word title (in lowercase) in every box (fitting properly) across the tops of the columns

when I return the code to the way it was, it goes back to all the headings being in uppercase, even though they're not defined that way, the + after the TITLE.. and the text being too big.

 

I tried setting the properties in the stylesheet, adjusting the font, font size and font weight under linkListing-heading and it had no effect.

 

any ideas?

Share this post


Link to post
Share on other sites
I copied the above mysql command into phpmyadmin and it ran fine. So the problem might be related to the version of mysql you are using, assuming the contribution is installed correctly.

 

Jack

 

Hi Jack,

 

Thanks for your reply. I am working on MySQL 3.23.49. I tried to run the querry in my phpmyadim and it gave the same error, Is this a MySql version related problem? if so, can i fix the querry? unfortunately I wont be able to update MySql version.

Share this post


Link to post
Share on other sites
Hi Jack... got another curiosity....

I got the contrib installed and it looks real nice thank you.

 

when I go to one of my links listings pages the table it creates with the links in it has the following header:

 

TITLE+ DESCRIPTION URL CLICKS

 

there's a few things here puzzling me...

I looked where the text for these headings are defined and not only is the + after TITLE most definately NOT there I have no idea where it's coming from. I did notice however that the text used for these headings is too big for it to fit neatly into the boxes at the tops of the columns like they're supposed to as well as not lining up correctly.

 

I was playing around with the code and I did this:

 

in link_listing.php where it says:

 

$list_box_contents[0][] = array('align' => $lc_align,

'params' => 'class="linkListing-heading"',

'text' => ' ' . $lc_text . ' ');

 

I changed it to say:

$list_box_contents[0][] = array('align' => $lc_align,

'params' => 'class="linkListing-heading"',

'text' => 'title');

then what I got was the word title (in lowercase) in every box (fitting properly) across the tops of the columns

when I return the code to the way it was, it goes back to all the headings being in uppercase, even though they're not defined that way, the + after the TITLE.. and the text being too big.

 

I tried setting the properties in the stylesheet, adjusting the font, font size and font weight under linkListing-heading and it had no effect.

 

any ideas?

The +'s is coming from the oscommerce code. It is standard in infobox headings. The font problem is due to an error in LinksManager. I posted the fix a page or two back.

 

Jack

Share this post


Link to post
Share on other sites
Hi Jack,

 

Thanks for your reply. I am working on MySQL 3.23.49. I tried to run the querry in my phpmyadim and it gave the same error, Is this a MySql version related problem? if so, can i fix the querry? unfortunately I wont be able to update MySql version.

Yes, that is most likely the problem. That version is very old, in computer terms. I'm surprised you are not having problems with other parts of your shop.

 

Jack

Share this post


Link to post
Share on other sites
Yes, that is most likely the problem. That version is very old, in computer terms. I'm surprised you are not having problems with other parts of your shop.

 

Jack

 

 

Hi Jack,

 

Yes its pretty old version when MySql 5.0 is the latest i guess. Untill now i havent had any problem with the shop or the contributions either. So what do you suggest? Just changing the this particular query will help or i will have further issues due mysql version?

 

Thanks for your reply and the great support you provide to everyone here!

 

Regards,

Mario

Share this post


Link to post
Share on other sites

I'm doing some tidying-up of my site now and was wondering

how do you turn off the count on the links.php page of how many

sites/links are listed within a category?

 

There is nothing within Admin-Configuration-Links pertaining to

this. This is NOT about "click count".

 

Candles (7) Bath and Body (4) Health and Wellness (1)

 

In the above example, those are some of my categories within

Links Manager with the number being how many links are within

each category. I do not want those numbers being displayed.

 

Thanks in advance.


26 contributions installed - - And counting ....

 

Just want to take this time to extend my appreciation to everyone who have patiently answered my questions over the months of working on my site. I hope to be able to "pass it forward" and help new folks.

Share this post


Link to post
Share on other sites
Hi Jack,

 

Yes its pretty old version when MySql 5.0 is the latest i guess. Untill now i havent had any problem with the shop or the contributions either. So what do you suggest? Just changing the this particular query will help or i will have further issues due mysql version?

 

Thanks for your reply and the great support you provide to everyone here!

 

Regards,

Mario

I would think there is other code in the code that will give you errors. But it isn't anything that couldn't be converted to work with your version, as far as I can recall. If you can't update mysql and you want this contribution, you don't have any other choice it seems.

 

Jack

Share this post


Link to post
Share on other sites
I'm doing some tidying-up of my site now and was wondering

how do you turn off the count on the links.php page of how many

sites/links are listed within a category?

 

There is nothing within Admin-Configuration-Links pertaining to

this. This is NOT about "click count".

 

Candles (7) Bath and Body (4) Health and Wellness (1)

 

In the above example, those are some of my categories within

Links Manager with the number being how many links are within

each category. I do not want those numbers being displayed.

 

Thanks in advance.

There's not an option for it. You would have to change the code in links.php from this
		echo '<br><b><u>' . $categories['link_categories_name'] . '</b></u></a> ' . '(' . $linkCount . ')<br>' . $categories['link_categories_description'] . '</td>' . "\n";

to this

		echo '<br><b><u>' . $categories['link_categories_name'] . '</b></u></a><br>' . $categories['link_categories_description'] . '</td>' . "\n";

 

Jack

Share this post


Link to post
Share on other sites

Jack,

 

Thank you very much - it worked just fine.

One day I'll learn enough about PHP to be more self-efficient.


26 contributions installed - - And counting ....

 

Just want to take this time to extend my appreciation to everyone who have patiently answered my questions over the months of working on my site. I hope to be able to "pass it forward" and help new folks.

Share this post


Link to post
Share on other sites

I'm sorry, another question:

 

http://www.moonlightdelights.com/catalog/links.php?lPath=7

 

For example, using this category -

how do I add more space between the TITLE/DESCRIPTION line

and the start of the links listing. It's just too bunched up there.

 

In links.php, I have increased all the pixel_trans.gifs to 25 or more and

I do not see any change.


26 contributions installed - - And counting ....

 

Just want to take this time to extend my appreciation to everyone who have patiently answered my questions over the months of working on my site. I hope to be able to "pass it forward" and help new folks.

Share this post


Link to post
Share on other sites
I would think there is other code in the code that will give you errors. But it isn't anything that couldn't be converted to work with your version, as far as I can recall. If you can't update mysql and you want this contribution, you don't have any other choice it seems.

 

Jack

 

 

Hi Jack,

 

Thanks for the info, i will try to covert the code. Thanks again for all ur help.

 

Cheers,

Mario

Share this post


Link to post
Share on other sites
That is problem a php version related problem. Try locating this code, at line 235 in admin/links.php
$lInfo_array = array_merge($links, $category);

and change it to

$lInfo_array = array_merge((array)$links, (array)$category);

I don't know that it will fix it but I know there was a bug in one version of php that could be sidestepped that way.

 

Jack

 

Hi Jack, thanks for the reply, unfortunately the error is the same when I click on 'New Link', my server is running SQL 4.0.21-nt if that helps? I read another post that seemed to suggest that if I manually entered some categories into the database it resolved the issue, but I'm not sure if it's the same issue. Have you any other suggestions I could try as this (and your other contributions) are fantastic!

 

Thanks again,

 

Nick

Share this post


Link to post
Share on other sites

You could try that suggestion. The problem is that the funtion is not seeing the arguments as valid, but theyare. You could seasrch the web for that error and php version. You may find a fix there. You could also ask your host to upgrade the php version. That version is getting quite old.

 

Jack

Share this post


Link to post
Share on other sites

Hi

 

I've installed the contibution however when I am viewing the shop and go to links.php, then click on a category i get this message:

 

1064 - You have an error in your SQL syntax near 'xor ld.language_id = '99')' at line 1

 

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

 

[TEP STOP]

I don't know where to look to put this right so please help!!

 

thanks

Edited by mawdesigns

Share this post


Link to post
Share on other sites

Everyone who's been having that "1064 - You have an error in your SQL syntax near 'xor ld.language_id = '99')' at line 1..." error, here's the solution:

 

I've got PHP 4.3.2 installed.

"xor" is I believe some older binary operator. I changed it to "or" and it got rid of the error.

 

ciraklizer

Share this post


Link to post
Share on other sites

I did a fresh install of the links contribution and have these errors:

 

admin/links manager/links

Links Search:

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 '-20, 20' 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 order by ld.links_title limit -20, 20

 

 

admin/links manager/Link Categories

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 '-6, 6' at line 1

 

select lc.link_categories_id, lc.link_categories_image, lc.link_categories_status, lc.link_categories_sort_order, lc.link_categories_date_added, lc.link_categories_last_modified, lcd.link_categories_name, lcd.link_categories_description from link_categories lc left join link_categories_description lcd on lc.link_categories_id = lcd.link_categories_id where lcd.language_id = '1' order by lc.link_categories_sort_order, lcd.link_categories_name limit -6, 6

 

 

admin/links manager/links/links status

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 '-20, 20' at line 1

 

SELECT l.links_id, l.links_reciprocal_url, l.links_status, ld.links_id, ld.links_title, lc.links_id, lc.date_last_checked, lc.link_found, ls.links_status_name from links l LEFT JOIN links_description ld on l.links_id = ld.links_id LEFT JOIN links_check lc on l.links_id = lc.links_id LEFT JOIN links_status ls on l.links_status = ls.links_status_id and ls.language_id = '1' limit -20, 20

 

 

Can someone please help and tell me how to fix these? I am using mysql 4.1.20-1 and php 4.3.9-3.18 on the server.

 

Thank you.

Edited by modom

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  

×