Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Links Manager for osC v1.00


VJ

Recommended Posts

The code is trying to load the tep_show_category function twice. You should search your files and make sure it is not declared twice. If it isn't, you will need to try to trace down the file that is doing the calling. It doesn't matter what order the database is installed it by the way.

 

Jack

 

Hello Jack

Mine is actually a Template BAsed OS commerce box wherein the Catagores are included in includes/header.php if i remove the include header.php from the code then the file runs just fine functional. however it doesnt have the look and feel of my template and it shows the catagories and other things in default installations manner. So i just want a info that if my Catagaries are declared in the header what i should remove from my file...

 

Warm Regards...

 

Rahul

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Ok this is how i got it working. Since i moved cataogaries to the header as per the template design new files of this cotribution (leftcolumn.php and right coumn was giving problem however the author has marked ==>> carefully in the code so it was easy to see whats going wrong. Once installed its really a great contribution

Link to comment
Share on other sites

Hi,

I have installed this into my MS2 version and although I get the Categories to display, as soon as I click on them I get a Split page error.

Warning: Division by zero in /home/stev9321/public_html/includes/classes/split_page_results_new.php on line 86

 

Warning: Division by zero in /home/stev9321/public_html/includes/classes/split_page_results_new.php on line 89

 

I have carried out the changes recommended by VJ on page 4 of this topic :

 

1. Copy /catalog/includes/spider.txt (if you haven't done so, earlier), and /catalog/includes/classes/split_page_results.php (rename it to split_page_results_new.php, before copying) from MS2.

 

2. In split_page_results_new.php, rename all instances of "splitPageResults" to "splitPageResultsNew" (you should find 2).

 

3. In /includes/modules/link_listing.php:

 

replace,

 

CODE

 

$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'l.links_id');

 

 

 

 

with,

 

CODE

 

// split-page-results

require(DIR_WS_CLASSES . 'split_page_results_new.php');

 

$listing_split = new splitPageResultsNew($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'l.links_id');

 

But still get the error above

 

Any help would be greatly appreciated.

 

Thanks

 

Steve

Link to comment
Share on other sites

Forgot to reference the lines in the Split page results file

 

// check if number_of_pages > $max_page_links

$cur_window_num = intval($this->current_page_number / $max_page_links); Line 86

if ($this->current_page_number % $max_page_links) $cur_window_num++;

 

$max_window_num = intval($this->number_of_pages / $max_page_links); Line 89

if ($this->number_of_pages % $max_page_links) $max_window_num++;

Link to comment
Share on other sites

jack, would it also be possible to also have the link details appear in the admin notification so one doesn't have to login to the admin panel to see who added the link & whatnot?

Link to comment
Share on other sites

jack, would it also be possible to also have the link details appear in the admin notification so one doesn't have to login to the admin panel to see who added the link & whatnot?
Yes. I have this written down to be added at some point. Thanks for the suggesstion.

 

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

First let me start off by saying, thanks to everyone for a great contribution. I installed this morning with no issues and have been playing around with it most of the day.

 

Everything seems to work fine except for one little issue.

 

After a new link has been submitted... from the Admin, Link Manager, I go to edit the link, change the status to approve (or any other option) and check the notify contact box and hit the update button... I get the following error:

 

Fatal error: Cannot instantiate non-existent class: email in /home/virtual/site189/fst/var/www/html/shop/admin/includes/functions/general.php on line 1157

 

Line 1157 in general.php reads: $message = new email(array('X-Mailer: osCommerce'));

 

If I don't check the notify contact box, I don't get the error.

 

The link gets approved either way, however, the notify doesn't work obviously.

 

If anyone can lend a hand or point me in the right direction, that would be great. I've searched in this thread, the rest of the forum and googled a bunch, but I haven't been able to find anything helpful.

 

Thanks again!

Shayne

Link to comment
Share on other sites

It's not an option like that. It is a physical file that you need to replace your original one with. Instructions are in the readme. It should have been added as an admin setting, which I will do in the next version. But for now, you need to rename the files.

 

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

It seems you are missing the admin/includes/classes.email.php file.

 

Jack

 

Jack! Thanks a bunch. That worked.

 

Actually, the email.php file looks like it was corrupted. So I just replaced it with an original and now works fine!

 

I installed the contrib yesterday and have been testing. Everything seems to work great! I've also modified quite a bit including the links listing as suggested in some of the earlier posts. One of the things I've tried to do is list the category name at the top of the listing page, but I just can't seem to list the right one.

 

My PHP skills are very very limited so I'm wondering if anyone can take a quick look and help me out... here's the piece of code I've inserted in links.php just under the HEADING_TITLE (cut and paste from code above).

 

<?php 
// Get the category name
$categories_query = tep_db_query("select lc.link_categories_id, lcd.link_categories_name, lcd.link_categories_description, lc.link_categories_image from " . TABLE_LINK_CATEGORIES . " lc, " . TABLE_LINK_CATEGORIES_DESCRIPTION . " lcd where lc.link_categories_id = lcd.link_categories_id and lc.link_categories_status = '1' and lcd.language_id = '" . (int)$languages_id . "' order by lcd.link_categories_name");

$number_of_categories = tep_db_num_rows($categories_query);
$categories = tep_db_fetch_array($categories_query)
					?>
<tr>
<td class="fieldKey"><img border="0" src="images/sub_arrow.jpg" width="61" height="21"><?php echo TEXT_CATEGORY . ($categories['link_categories_name']); ?></td>
</tr>

 

What I was hopping to accomplish was to display the current category. Instead it's displaying the first category in the list.

 

Here's a link to my site if anyone cares to take a look: http://www.draxion.com/shop/links.php

 

Feel free to add some links as well :D . The site is not live, but should be up in about two weeks.

 

Thanks again everyone!

Shayne

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

In the admin I have this error when clicking the link manager or the links page:

Warning: Division by zero in /home/httpd/vhosts/shadenthings.com/httpdocs/admin/includes/classes/split_page_results.php on line 33

1064 - You have an error in your SQL syntax near '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_status from links l left join links_description ld on l.links_id = ld.links_id where ld.language_id = '1' order by ld.links_title limit -0, MAX_LINKS_DISPLAY

 

[TEP STOP]

 

Also, where do you find the links page to look at all the links after the links are submitted?

Link to comment
Share on other sites

MAX_LINKS_DISPLAY shouldn't be displayed in the sql statement so it appears that is not defined in your database. Did you run the database setup file? If so, you will need to look at your database with phpmyadmin to see what the problem is.

 

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 ran the Base de Datos.txt file...all of it.

 

Any idea where to look in the db?

 

Also, where is the page that you can see all the links on when someone comes to your site?

 

I checked and do not find MAX_LINKS_DISPLAY in the db. The error continually says the column count is off but all I can see is that there is not a configuration ID and your sql says this:

 

INSERT INTO `configuration` VALUES ('Links Image Width', 'LINKS_IMAGE_WIDTH', '120', 'Maximum width of the links image.', 0, 3, NULL, '2005-09-19 16:23:49', NULL, NULL);

 

I have these:

configuration_id int(11) No auto_increment

configuration_title varchar(64) No

configuration_key varchar(64) No

configuration_value varchar(255) No

configuration_description varchar(255) No

configuration_group_id int(11) No 0

sort_order int(5) Yes NULL

last_modified datetime Yes NULL

date_added datetime No 0000-00-00 00:00:00

use_function varchar(255) Yes NULL

set_function

 

I cannot find it so if you can I would appreciate it.

Edited by modom
Link to comment
Share on other sites

I manually added the configuration_id to the beginning like this and now have listings in configuration/links:

INSERT INTO `configuration` VALUES ('359', 'Links Image Width', 'LINKS_IMAGE_WIDTH', '120', 'Maximum width of the links image.', 0, 3, NULL, '2005-09-19 16:23:49', NULL, NULL);

 

Why are these id's not being added automatically?

Link to comment
Share on other sites

When I click on "check links" in the admin under the links manager it has a bix red x next to the name of the company when it was added.

 

What does this mean?

Link to comment
Share on other sites

I'm not sure what you are seeng but a red X is displayed if you perform a check all links and the link isn't found. Maybe that's it.

 

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

Yes, but I submitted a link twice and still get the red x.

 

Since the url shows up in the admin it is not being found on the site.

 

Do you have to make categories for the links to show up on the site? I did that also and the link still did not show up.

 

This is where it is and the link is in the admin but nothing is on the site.

http://www.shadenthings.com/links.php

Link to comment
Share on other sites

anyone know why the links do not show up on the site in one of the category folders?

 

I redid the files and uploaded them but still the links do not show up.

 

Any help is greatly appreciated.

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