Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links Manager II


Recommended Posts

I am not fluent in the non-English lanugages. The language files were mostly left over from what was in the basic installation from the beginning. Someone sent me translations for them which I included but I've no way to know if the translations are correct. It is probably best to just copy the English files and do the translation yourself. In updates of my other contributions, I have been deleting all non-English files since I can't support them. That will be the case with this one whenever I update it again.

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

  • 5 weeks later...

I have installed this addon and found the answers to the problems I found with the LINKS_CATEGORY but I have one more problem that I have seen mention on the previous page. If you have a link entry that has been entered and it has a link image url assigned and it is working. If you edit the entry for some reason like changing the category or description text and leave the Image URL file search box alone, and there is an image name displayed to the right of the file search box. If you make changes and save them (leaving the file brows box alone) the Image Url will be lost and and error will now be displayed in the information for that link that the Image is missing. The image is still in the Images/links_manager/uploades directory but the information has been erased from the database entry. Looking at the code, if any kind of save is done the "link_image_url" will be updated even if nothing has been uploaded.

It is not a fatal problem, just kind of annoying and causes you to hunt down the image that the link sharing sponsor has provided if you make any changes to the link information. I have been trying to figure out what needed to be changed, but dont understand the code well enough.

 

Thanks in advance for any assistance and for another great addon to OSC

Bill V

Link to comment
Share on other sites

@@billv686 To fix this, please find this code in admin/links.php

 $links_image = new upload('links_image_url');
 $links_image->set_destination(DIR_FS_CATALOG_IMAGES .'links_manager_uploads/');
 if ($links_image->parse() && $links_image->save()) {
	 $linksImg = tep_db_input($links_image->filename);

and replace it with

 if (isset($_FILES['links_image_url']['name']) && tep_not_null($_FILES['links_image_url']['name'])) {
	 $links_image = new upload('links_image_url');
	 $links_image->set_destination(DIR_FS_CATALOG_IMAGES .'links_manager_uploads/');

	 if ($links_image->parse() && $links_image->save()) {
		 $linksImg = tep_db_input($links_image->filename);
	 }
 } else if (isset($_POST['links_image_url'])) {
	 $linksImg = $_POST['links_image_url'];

Then find this code

		 echo $lInfo->links_image_url . tep_draw_hidden_field('links_image_url');
		 } else {
		 echo tep_draw_file_field('links_image_url') . (tep_not_null($lInfo->links_image_url) ? '  ' . $lInfo->links_image_url : '');

and replace it with

		 echo $lInfo->links_image_url;
		 } else {
		 echo tep_draw_file_field('links_image_url') . (tep_not_null($lInfo->links_image_url) ? '  ' . $lInfo->links_image_url : '');
		 echo tep_draw_hidden_field('links_image_url',$lInfo->links_image_url);

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

Thanks Jack, that did the trick.

 

There is one more little detail but I am not sure if its worth the time, but I thought I would let you know anyway. If you replace the link image with a new one, the original image is not deleted but left in the links_manager_uploads/ directory.

 

thanks again

Bill V

Link to comment
Share on other sites

That's standard behavior with oscommerce. You'll notice the same thing with your products and categories. But I'll put it on the lest of possible changes for Links Manager.

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

  • 1 month later...

I have OSC 2.2-MS2 with an older version of Link Manager. I was wondering if anyone knows of how to adjust it so that the links for each catagory in links.php can be direct links? Right now the system uses dynamic links via redirect.php and all three links (image, title, url) for each link partner are dynamic redirects.

 

I looked for a contribution for this issue and could not find one. I'm not a PHP programmer but find my way around OSC. Any help on this would be greatly appreciated.

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Link to comment
Share on other sites

Thanks, I tried that but it made no difference in the links on that page, and that Spider Friendly Links setting is recommended to be on. When I hover my mouse over the image or title or link of the Link Parner on the links.php page, the link in the Firefox browser at the bottom left is showing:

 

www.mysite.com/redirect?action=links&goto=5

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Link to comment
Share on other sites

Jack, Thank you much. That did the trick. The links are all direct links now. I was wondering if there was a code fix to keep these as direct links in case I want the click count enabled? I'd actually prefer it enabled though it is not as important as having direct links for SEO.

Edited by Demitry

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Link to comment
Share on other sites

No, there isn't. The original programmer coded it that way and at that time, the links for SEO were handled differently. It's on my list to make that change but there's no telling when that might be.

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

@@Jack_mcs

 

I get this error when I click the link to open link_categories in admin:

 

The requested URL /username/admin/FILENAME_LINKS_CATEGORIES was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

@@dhooper said there was a typo but she didn't mention where and how she fixed it.

 

Thanks

Edited by discxpress
Link to comment
Share on other sites

@@Jack_mcs

 

I found the solution:

 

in admin/includes/boxes/links.php change:

 array(
 'code' => FILENAME_LINKS_CATEGORIES,
 'title' => BOX_LINKS_LINK_CATEGORIES,
 'link' => tep_href_link(FILENAME_LINKS_CATEGORIES)
 ),

to

 array(
 'code' => FILENAME_LINK_CATEGORIES,
 'title' => BOX_LINKS_LINK_CATEGORIES,
 'link' => tep_href_link(FILENAME_LINK_CATEGORIES)
 ),

 

Simply remove the 2 S and issue resolved!

Edited by discxpress
Link to comment
Share on other sites

  • 1 month later...

Hi Jack,

 

I have installed Links Manager VII 1.29 on oscommerce 2.3.3, I tried to make a new link from the administration area, but the new link couldn't be linked to the category when I selected the category from the drop down menu, I don't know how to fix it, could you please help me?

 

Thanks in advanced.

 

chuntse

Link to comment
Share on other sites

Are you saying you click on New Link in Links Manager, fill in all of the fields as well as select a category from the dropdown list and it fails? If so, what is the failure?

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

Since you didn't state the failure as requested, I can't even guess. That is a basic part of this addon and if it were not working, I would think others would mention it.

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

  • 1 month later...

hello i got 2 problems. the first one i got Warning: Illegal string offset 'links_title' in /storage/content/16/132516/rma-data.se/public_html/links.php on line 79. second i The requested URL /admin/FILENAME_LINKS_CATEGORIES was not found on this serve,

 

Any ideas??

Link to comment
Share on other sites

Without knowing your version of shop I can't even guess at the first one. I've not seen it before in this addon but that section has to do with links on the shop side so it may be you have an invalid link setup. The second was addressed here recently. Look back in the thread to find the fix.

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

  • 6 months later...

A new version has been uploaded with these changes:

 

- Corrected mistake in the link box in admin for FILENAME_LINK_CATEGORIES.

- Removed extra line of code in includes/boxes/information.php.

- Corrected code for category images (from member Caludia (clau123).

- Corrected code to fix the loss of the image in admin (From member billv686).

- Added code in links_submit.php to prevent database checking if an input error exists.

- Fixed bug in links submit page that caused two breadcrumb entries.

- Much of the code for 2.3 was redone, courtesy of Kevin (wdepot).

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

Hello Jack,

I got some error :

 

Warning: Division by zero in C:\xampp\htdocs\shop\links.php on line 195

Warning: Division by zero in C:\xampp\htdocs\shop\links.php on line 241

Warning: Division by zero in C:\xampp\htdocs\shop\links.php on line 241

 

when displaying One Category, and it will multiplying if i add two or three category

 

i dont have a clue how to fix these error Jack, i need some help ..

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