Jump to content
Jack_mcs

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Yes, it fails, I check the database, it inserts nothing into the table of links_to_link_categories and also "update", it change nothing. I don't know why. Nobody reported this failure?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Hi Jack, I am so sorry I made a mistake. I did't notice that's the new category. And above it there is a Category. Sorry for taking your time, Have a good day.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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 ..

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

×