Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Links Manager for osC v1.00


VJ

Recommended Posts

Check to be sure you have this line in your .htaccess file
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

It allows the links for Links Manager to be rewriten.

 

Jack

 

 

I'm having the same problem where my link sent out in my approval letter is wrong. I've tried to put this code in my .htaccess file but it doesn't correct it. Is there another way to fix this? Below is what my catalog/.htaccess.php file looks like. Is this right?

 

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

#

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

#

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals 1

#</IfModule>

 

RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Somewhere in this thread I explain about taking out the code that generates that link (as I recall). That is probably what is needed.

 

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

Somewhere in this thread I explain about taking out the code that generates that link (as I recall). That is probably what is needed.

 

Jack

 

 

Are you talking about the code that generates the link in the approval letter? If so, which file is that link coming from? If I was to take the code out, then there wouldn't be a link in the email anymore would it? I just don't understand. Any help you could give me I would really appreciate it.

Link to comment
Share on other sites

Yes, I think it is admin/links.php. The code needs to be replaces, not removed.

 

Jack

 

 

Is this the code that needs to be replaced in the admin/links.php? If so what do I replace it with?

 

$category = tep_db_fetch_array($categories_query);

$catname = str_replace(" ", "-", $category['link_categories_name']);

$siteURL = sprintf("%s/%s-links-%s.html", HTTP_CATALOG_SERVER, $catname, $category['link_categories_id']);

$siteURL = sprintf(EMAIL_TEXT_URL_LOCATION, $siteURL);

Link to comment
Share on other sites

Try changing this

				 $siteURL = sprintf("%s/%s-links-%s.html", HTTP_CATALOG_SERVER, $catname, $category['link_categories_id']);

to this

				 $siteURL = sprintf("%s/%s/%s", HTTP_CATALOG_SERVER, $catname,$links_url);

 

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

Try changing this
				 $siteURL = sprintf("%s/%s-links-%s.html", HTTP_CATALOG_SERVER, $catname, $category['link_categories_id']);

to this

				 $siteURL = sprintf("%s/%s/%s", HTTP_CATALOG_SERVER, $catname,$links_url);

 

Jack

 

Now the link comes up in the email as http://zbookz.com/automotive/http://www.co...automanuals.com.

 

Instead of http://zbookz.com/catalog/links.php?lPath=1

Link to comment
Share on other sites

I still cannot get the link to show up correctly in the approval letter with Links Manager. I also tried to install Ultimate Seo URL and cannot get the Seo URL link to appear in the admin configuration. I've uninstalled and reinstalled several times already and cannot get this to work. What am I doing wrong?

Link to comment
Share on other sites

The $links_url causes the partners website to show up instead of the path on my website where their link is.
Try this code
$siteURL = sprintf("%s/links.php?lPath=%s", HTTP_CATALOG_SERVER,$category['link_categories_id']);

 

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

Try this code
$siteURL = sprintf("%s/links.php?lPath=%s", HTTP_CATALOG_SERVER,$category['link_categories_id']);

 

Jack

 

Thanks Jack! I was having the same problem but your code fixed it!

Link to comment
Share on other sites

Thanks Jack! I added the word catalog in your link you gave me and it works. Instead of $siteURL = sprintf("%s/links.php?lPath=%s", HTTP_CATALOG_SERVER,$category['link_categories_id']);

 

I put:

 

$siteURL = sprintf("%s/catalog/links.php?lPath=%s", HTTP_CATALOG_SERVER,$category['link_categories_id']);

 

Everything works great now. I really appreciate your help. Thank you very much!

Link to comment
Share on other sites

hi guys!

 

first i'd like to say this is a great contrib - i love it to bits!

 

i was wondering if it was possible to use this contrib for multiple sites.

 

i would like to have one database for my links - but use it on all my sites, only difference is that there would be an extra field/setting - that links a Link Partner to a particular site, and when you open that site - it will only show the links that are linked to that site.

 

hope this makes sense - would appreciate any help on this!

Link to comment
Share on other sites

Yes, that could be done. You would need to add an extra field to the database and then check it before displaying the 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

Hi Just installed the contribution, everything seems ok on the site, however, in admin I get the following when I try to add a category. Anyone have an idea?

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/buykrcom/public_html/catalog/admin/link_categories.php on line 111

 

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

 

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

 

Any thoughts would be appreciated.

 

Thanks,

 

Rick

Link to comment
Share on other sites

There was a post to fix this a while back. You just need to read back through this thread.

 

Jack

 

Jack, Thanks for the response. I made that change before posting and still get the error messages. Everything works, which is good, but would be nice to find a way to fix the warnings? Any additional thoughts or suggestions to try?

 

THanks,

 

Rick

Link to comment
Share on other sites

If you just want to supress the error you can change this (see file and line number above)

$cInfo_array = array_merge($link_categories, $links_count);

to this

$cInfo_array = @array_merge($link_categories, $links_count);

 

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

Hello Jack, all.

 

I uploaded links.php and links_submit.php to all language folders, and made the appropriate translations. Any idea why it's not working? I thought it was multi-language compatible.

 

Thanks.

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

I've tested it with the various languages and it works so it must be something in your setup. Possibly the language settings in the links options or the languages being out of order as mentioned previously in this thread. Without any indication of how it is failing, it is difficult to make a guess.

 

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 Jack. One other thing, if you don't mind. On the links_submit page, neither of us (friend and I) can get the help thing to pop up the help file. It appears to be pointing to the proper popup when I hover over, but nothing pops up. I haven't altered the catalog/links_submit page.

 

Now I've searched these forums and found that one typo, "RECIPRICAL", which fixed that one guy's problem, but I don't have this typo. So I'm not sure why our popup HELP files on the links_submit aren't working.

 

Would you possibly have any suggestions? Thanks again Jack,

 

Jason

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

Replace this line

				<?php echo '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_LINKS_HELP) . '\')">' . TEXT_LINKS_HELP_LINK . '</a>'; ?>

with this

				<script>document.writeln('<a style="cursor:hand" onclick="java script:popup=window.open('
									   + '\'<?php echo tep_href_link(FILENAME_POPUP_LINKS_HELP); ?>\',\'popup\','
									   + '\'scrollbars,resizable,width=520,height=350,left=50,top=50\'); popup.focus(); return false;">'
									   + '<span class="smallText" style="color: red;"><?php echo TEXT_LINKS_HELP_LINK; ?></span></a>');</script>

 

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

I tried this Jack, and here's what I get: http://www.thevisiondepot.com/links_submit.php ... I viewed the source, and still can't figure it out. I think I might have missed a quotation mark somewhere.

 

Jason

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

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