Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links Manager II


Recommended Posts

can you point me to this link ? so that i can get this sorted out!

 

what should i change or how should i change the xor ? id to ?

Open the file and do a search and replace.

 

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

Thanks for the reply. The only language option I have is English. I removed the rest from my store. The configuration side all looks appropriate. Still no links.

Hello Jack,

Wonderful contribution. I think I have found the reason for this problem. I am using version 1.18 and am using only one language - English. In admin/links.php at line 111, $links_language = tep_db_prepare_input($_POST['links_language']); is set to "en". When $links_language is used to store the language_id in the Links Description table later on, the language_id is set to zero instead of the appropriate language id. This happens for both Insert and Update. A "links submit" sets the language id correctly but when an admin "approve" of the link is done, the language id is set to zero on the Update.

 

I inserted one line of code following line 117 (marked //new) to set $links_language to the appropriate language_id. Please let me know if this is the correct fix.

 

Thanks

 

$links_language = tep_db_prepare_input($_POST['links_language']);

       $languages_array[] = array('id' => '99',
                              'text' => 'All');
       for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $languages_array[] = array('id' => $i + 1, //$languages[$i]['id'],
                                    'text' => $languages[$i]['name']);
	  if($links_language == $languages[$i]['code']) $links_language = $languages[$i]['id']; // new
	} 

Link to comment
Share on other sites

Hello Jack,

Wonderful contribution. I think I have found the reason for this problem. I am using version 1.18 and am using only one language - English. In admin/links.php at line 111, $links_language = tep_db_prepare_input($_POST['links_language']); is set to "en". When $links_language is used to store the language_id in the Links Description table later on, the language_id is set to zero instead of the appropriate language id. This happens for both Insert and Update. A "links submit" sets the language id correctly but when an admin "approve" of the link is done, the language id is set to zero on the Update.

 

I inserted one line of code following line 117 (marked //new) to set $links_language to the appropriate language_id. Please let me know if this is the correct fix.

 

Thanks

 

$links_language = tep_db_prepare_input($_POST['links_language']);

       $languages_array[] = array('id' => '99',
                              'text' => 'All');
       for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $languages_array[] = array('id' => $i + 1, //$languages[$i]['id'],
                                    'text' => $languages[$i]['name']);
	  if($links_language == $languages[$i]['code']) $links_language = $languages[$i]['id']; // new
	} 

Thanks for posting that. Although I think the code should be changed from
$languages_array[] = array('id' => $i + 1, //$languages[$i]['id'],

to

$languages_array[] = array('id' => $languages[$i]['id'],

This was a bug pointed out in the old version and apparently was not changed when I did the update.

 

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

Firstly, thanks for a great contribution! Just implemented 1.18 on www.greatgiftsgalore.co.uk which (now!) uses a modified/compatible version of Ultimate SEO. I've Made a few changes/fixes and thought I'd post them here for others.

 

In catalog/links_submit.php before <!doctype

 

Changed:

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_LINKS));

 

To:

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_LINKS_SUBMIT));

 

The breadcrumb link was wrong.

 

In catalog/links.php (around line 93) added:

if  ($link_featured_cat == $link_featured) $link_featured_cat = '';

 

BEFORE

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LINKS);

 

This stops getting two identical featured links if you end up with only one active....

 

And around line 104 commented out the existing code and replaced it (left it in for comparison):

 

// $breadcrumb->add($pathStr[$i], FILENAME_LINKS . '?parentID=' . tep_get_category_id($pathStr[$i]));
$breadcrumb->add($pathStr[$i], tep_href_link(FILENAME_LINKS, 'lPath=' . tep_get_category_id($pathStr[$i])));

 

I'm only using (and only ever will use) 1 level of category, so I wanted to get rid of the parentid=0 parameters. So around line 198 I replaced this:

$lPath_new = 'parentid=' . $categories['parent_id'] . '&lPath=' . $categories['link_categories_id'];

 

WITH:

$lPath_new = 'lPath=' . $categories['link_categories_id'];

 

It may be best to test for nested categories, and if none found use the new code, else use old. I did this for the next section, so will probably go back and fix it now I've noticed :rolleyes:

 

Finally, around line 485 I replaced:

					<?php
				  $prev_query = tep_db_query("select parent_id from " . TABLE_LINK_CATEGORIES . " where link_categories_id = '" . $lPath . "'");
				  if (tep_db_num_rows($prev_query)) {
				   $prev = tep_db_fetch_array($prev_query);  

				?>
				   <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS, 'lPath='.$prev['parent_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
				<?php
					}
				?>				 
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td align="right" align="center"><?php echo tep_draw_form('check_links', tep_href_link(FILENAME_LINKS, '', 'NONSSL'), 'post', 'onSubmit="return true;" onReset="return true"') . tep_draw_hidden_field('action_search', 'process'); ?>
				Search <?php echo tep_draw_input_field('links_search', '', 'maxlength="255", size="30"', false) . tep_image_submit('button_quick_find.gif', SEARCH); ?> 
		 	 		 </form></td>
				<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT, tep_get_all_get_params()'lPath=' . $lPath) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>

 

WITH:

					<?php
				  $prev_query = tep_db_query("select parent_id from " . TABLE_LINK_CATEGORIES . " where link_categories_id = '" . $lPath . "'");
				  if (tep_db_num_rows($prev_query)) {
				   $prev = tep_db_fetch_array($prev_query);  
				   if ($parentid != 0) {  
				?>
				   <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS, 'lPath='.$prev['parent_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
				<?php
					}
				  else{
				  ?>
				   <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
				<?php
				   }
					}
				?>				 
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td align="right" align="center"><?php echo tep_draw_form('check_links', tep_href_link(FILENAME_LINKS, '', 'NONSSL'), 'post', 'onSubmit="return true;" onReset="return true"') . tep_draw_hidden_field('action_search', 'process'); ?>
				Search <?php echo tep_draw_input_field('links_search', '', 'maxlength="255", size="30"', false) . tep_image_submit('button_quick_find.gif', SEARCH); ?> 
		 	 		 </form></td>
				<?php if ($lPath != 0) { ?>
				<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT, tep_get_all_get_params()'lPath=' . $lPath) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>
				<?php }
				else
				{ ?>
				 <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>
				<?php } ?>

 

This will fix up the button parameters for correct SEO links (including getting rid of the -link-0.html), and in the case of single level categories eliminate the parentid parameter altogether (and the unnecessary sort one from the submit link button).

 

The submit_link.php file is still not SEO optimised in terms of parameters, but I've disallowed it in robots.txt anyway...

 

Hope I've managed to keep out the typos, and that this helps someone.

 

Paul

Link to comment
Share on other sites

  • 2 weeks later...

Looks like a good contribution so far. It all shows up just fine in the administration side but my home page doesn't show a links page/button/clickable link to the links page or anything. Not sure what I am missing.

 

I looked at all the files to see if everything got uploaded...it did...except I'm really tired...I could have overlooked something. I will take another fresh look tomorrow.

 

I have a bts template with ultimate seo urls contribution. If anyone knows something I can do...let me know.

 

Janet

Link to comment
Share on other sites

Looks like a good contribution so far. It all shows up just fine in the administration side but my home page doesn't show a links page/button/clickable link to the links page or anything. Not sure what I am missing.

 

I looked at all the files to see if everything got uploaded...it did...except I'm really tired...I could have overlooked something. I will take another fresh look tomorrow.

 

I have a bts template with ultimate seo urls contribution. If anyone knows something I can do...let me know.

 

Janet

The install instructions won't work directly with BTS based shops. You could ask in the BTS support thread to see if anyone has the converted files. But the main problem you are having is problem that the inforamtion box you changed to include the links link is not the one being used by the enabled template.

 

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

The install instructions won't work directly with BTS based shops. You could ask in the BTS support thread to see if anyone has the converted files. But the main problem you are having is problem that the inforamtion box you changed to include the links link is not the one being used by the enabled template.

 

Jack

This is such a nice contribution from what I can see in the administation. It is unlike any other links manager I have seen yet. I hope someone has converted for bts. I see version 1.0 in the forum that looks like VJ may have helped convert it. But 1.8 is so new...I doubt anyone has tackled it yet. However, I did leave new post today on the bts side of the forum to see if anyone can help.

 

I wished I was more knowledgable about this stuff....so I could do it myself.

 

Thanks for responding Jack:)

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I have ran into a problem after installing this contribution, everything seems to work but for some reason I don't get the the Reciprocal Page Details or the code for my website but I still get all the text relating to it.

 

Also I have no login box at the bottom in order to edit the link once it has been submitted.

 

I have installed itHere

Link to comment
Share on other sites

Hi,

 

I have ran into a problem after installing this contribution, everything seems to work but for some reason I don't get the the Reciprocal Page Details or the code for my website but I still get all the text relating to it.

 

Also I have no login box at the bottom in order to edit the link once it has been submitted.

 

I have installed itHere

Those are options in admin->Configuration->Links.

 

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

  • 2 weeks later...

I have installed LinksManager_II_V_1.18 and am getting the following Error Warning in the Admin - Links Manager II - Links.php page:

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/collegh8/public_html/admin/links.php on line 796

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/collegh8/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/collegh8/public_html/admin/includes/classes/object_info.php on line 18

 

Can someone direct me as to how to correct this?

Link to comment
Share on other sites

I have installed LinksManager_II_V_1.18 and am getting the following Error Warning in the Admin - Links Manager II - Links.php page:

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/collegh8/public_html/admin/links.php on line 796

I seem to recall a fix for this being posted in this thread. Try going back through or use google:

 

site:www.oscommerce.com/forums links manager Warning: array_merge() [function.array-merge]

 

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

Forgive me if i'm missing something obvious but where do I disable the images and changing to vertical listing?

Tried searching for LINKS_DISPLAY_FORMAT_STANDARD but it only appreas in

 

./catalog/links_db_update.php

./catalog/links.php

./catalog/links_setup.php

 

Currently running v 1.18.

 

Thnx,

George

 

 

Ohhh changed to vertical listing & no image & it's getting faster!!

Sorry :blush:

 

so you mean ??

admin/links.php

admin/link_categories.php

admin/link_contact.php

admin/link_featured.php

admin/link_status.php

 

Have I missed any?

 

Thanks

Julie

Link to comment
Share on other sites

Forgive me if i'm missing something obvious but where do I disable the images and changing to vertical listing?

Tried searching for LINKS_DISPLAY_FORMAT_STANDARD but it only appreas in

 

./catalog/links_db_update.php

./catalog/links.php

./catalog/links_setup.php

 

Currently running v 1.18.

 

Thnx,

George

 

disregard my question :) closer look at the links_setup.php answered it already. Great mod btw. Thnx

Link to comment
Share on other sites

  • 2 weeks later...

Dear all,

 

First of all thank you for this contrib.

 

 

I installed the latest version of links manager II v1.19 and it seems I have a query issue.

Looking around using google, it seems that some people also have it but i was not able to find a fix in any of the thread/website i found.

 

Here is the Sql error i have :

 

Into the admin section, I added a Link category.when I click on "links" in order to add a link, here is the error I recieve :

 

Warning: Division by zero in /***/catalog/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 '-0, 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_reciprocal_disable, l.links_status from links l left join ( links_description ld ) on ( l.links_id = ld.links_id ) order by ld.links_title limit -0, MAX_LINKS_DISPLAY

[TEP STOP]

 

I'm not a developer any help would be very grateful

 

I'm running mysql 5.0.45

Link to comment
Share on other sites

Dear all,

 

First of all thank you for this contrib.

I installed the latest version of links manager II v1.19 and it seems I have a query issue.

You could try contacting the person that uploaded that version although such uploads are usually not supported. Try using V 1.18 and it should 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

You could try contacting the person that uploaded that version although such uploads are usually not supported. Try using V 1.18 and it should work.

 

Jack

 

changes has been roll back and it seems like I have the same issue.

 

I dont have any cache enable during this test.

 

Thanks for the help :)

Edited by spcs
Link to comment
Share on other sites

changes has been roll back and it seems like I have the same issue.

 

I dont have any cache enable during this test.

 

Thanks for the help :)

I'm sorry. I saw the version number and didn't read any futher since I don't support versions other than my own. On re-reading that, the problem you are having is a mysql compatibility. To fix it, open the admin/includes/classes/split_page_results.php file and change this line
	  $sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

to this one

	  $sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

 

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

I'm sorry. I saw the version number and didn't read any futher since I don't support versions other than my own. On re-reading that, the problem you are having is a mysql compatibility. To fix it, open the admin/includes/classes/split_page_results.php file and change this line
	  $sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

to this one

	  $sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

 

Jack

 

I already have this line into the file, I'm using the latest version of oscommerce.

 

line 38 into admin/includes/classes/split_page_results.php

 

$sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

 

Any other hints ? :)

 

I'm trying to debug a bit

 

 

many thanks for your help

 

 

I'm refering to the link manager v1 thread where you are/were actif "http://www.oscommerce.com/forums/index.php?showtopic=97493&st=140&p=688244entry688244"

and the only anwser from the guy who submitted the error was "I dont know what happened but everything is normal now " which is not helping me so much.

 

hope that's not going to disapear like that, I would like to understand !

 

On the creload forum ( I dont have a creload !!! just a basic oscommerce with few contrib ) but a guy seems to have the issue and it seems that they are refering to multilangue issue

http://forums.creloaded.com/Forums/viewtop...sc/start=0.html

 

my oscommerce website has 3 languages.

Edited by spcs
Link to comment
Share on other sites

it seems that the offset is negative and since mysql 4.1, mysql does not accept a negative offset.

But I had that issue with another contrib which I fixed with the fix you proposed sometime ago :)

 

 

I'm going to try to add manually a link into the DB, humm same issue.

Edited by spcs
Link to comment
Share on other sites

it seems that the offset is negative and since mysql 4.1, mysql does not accept a negative offset.

But I had that issue with another contrib which I fixed with the fix you proposed sometime ago :)

I'm going to try to add manually a link into the DB, humm same issue.

 

sorry for the spam, but the fix you mention earlier in the thread seems to fix "1064 - You have an error in your SQL syntax; .../... syntax to use near '-20, 20' at line 1" issue as mention in you readme.txt and few other oscommerce site.

Link to comment
Share on other sites

I have installed LinksManager_II_V_1.18 and am getting the following Error Warning in the Admin - Links Manager II - Links.php page:

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/collegh8/public_html/admin/links.php on line 796

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/collegh8/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/collegh8/public_html/admin/includes/classes/object_info.php on line 18

 

Can someone direct me as to how to correct this?

 

Did you find the solution? Im getting same error!

Thanks

Link to comment
Share on other sites

  • 2 weeks later...
...

 

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_reciprocal_disable, l.links_status from links l left join ( links_description ld ) on ( l.links_id = ld.links_id ) order by ld.links_title limit -0, MAX_LINKS_DISPLAY

 

[TEP STOP][/code]

...

 

Hi. It seems you did not run the sql-statement (links_db_update.php). MAX_LINKS_DISPLAY is undefined. greets torsten

Link to comment
Share on other sites

I have just installed Links Manager v1.18 and it appears to be an extremely wonderful thing! I have an idea about a modification to this program and wanted to throw it out there for future consideration. ....... please consider the following scenario:

 

Let's say I go to someone elses website and wish to submit my URL to them. Their page tells me to have their link already in place before submitting mine for verification (just as the default text states in the Links Manager program). How do I do that? I have not seen an option for "Add Url" or anything in the admin for that. In that case also, how do I then take care of the problem that many times... I will not know the recip link of theirs to enter right away. (Atleast not until they approve me and get their email with the additional info). Plus, many sites are not always good about making sure that any other information that people need to enter into programs such as Link Manager is available. Therefore, the entry from admin should not go through a check for required fields and simply be as entered.

 

If there is an option for something like this already, I've completely missed it but I don't think I did. With something added like I've mentioned... I believe that Link Manager would really be any and everything that anyone out there could ever want or reasonably need. Very cool program... well done!!!

 

Iceman

Link to comment
Share on other sites

I have just installed Links Manager v1.18 and it appears to be an extremely wonderful thing! I have an idea about a modification to this program and wanted to throw it out there for future consideration. ....... please consider the following scenario:

 

Let's say I go to someone elses website and wish to submit my URL to them. Their page tells me to have their link already in place before submitting mine for verification (just as the default text states in the Links Manager program). How do I do that? I have not seen an option for "Add Url" or anything in the admin for that. In that case also, how do I then take care of the problem that many times... I will not know the recip link of theirs to enter right away. (Atleast not until they approve me and get their email with the additional info). Plus, many sites are not always good about making sure that any other information that people need to enter into programs such as Link Manager is available. Therefore, the entry from admin should not go through a check for required fields and simply be as entered.

 

If there is an option for something like this already, I've completely missed it but I don't think I did. With something added like I've mentioned... I believe that Link Manager would really be any and everything that anyone out there could ever want or reasonably need. Very cool program... well done!!!

 

Iceman

 

You can enter the details for a new link by clicking the new link button in the Links Manager II admin page. Enter the contact details as your own, but the url and description to match the site you wish to link to. Turn off link checking for that url - it isn't going to work until your link is approved anyway. You then just look up the appropriate link page url to feed to the other site.

 

Simple ;)

 

Paul

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