Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Links Manager For OSC v0.20 released


125 replies to this topic

#1 VJ

  • Community Member
  • 173 posts
  • Real Name:VJ
  • Gender:Male

Posted 21 May 2003, 17:42

This program enables display and management of a categorized list of links to other websites. You can add/edit/delete/enable/disable links and categories from the admin interface.

It also includes a link submit form, where users can submit links and request you to add them to your list.

http://www.oscommerce.com/community/contributions,1256

Please give it a try and send in your comments and suggestions. This is my first ever contribution for OSC. Hope I've done a fair enough job.

VJ

--
http://www.salehut.com

#2 loxly

  • Community Member
  • 1,802 posts
  • Real Name:Deborah Carney
  • Gender:Male
  • Location:New York State

Posted 21 May 2003, 17:46

If it is the link program that is on your site this will be a great addition to many osc stores!

#3 VJ

  • Community Member
  • 173 posts
  • Real Name:VJ
  • Gender:Male

Posted 21 May 2003, 18:06

Yes, it is indeed the very same program.

VJ

--
http://www.salehut.com

#4 Snowman

  • Community Member
  • 645 posts
  • Real Name:Banned
  • Location:Coleraine, VIC, Australia

Posted 22 May 2003, 05:51

What a great looking contribution :)

Just one question though..(i havent had a chance to install it yet)

how deep can the categories go?

#5 jchasick

  • Community Member
  • 1,511 posts
  • Real Name:jeff
  • Location:California

Posted 22 May 2003, 06:07

now thats a cool contribution - like a mini portal system for your site

nice work!!
Reading is beneficial - Searching is enlightening
find answers at wiki.oscommerce.com/top

#6 loxly

  • Community Member
  • 1,802 posts
  • Real Name:Deborah Carney
  • Gender:Male
  • Location:New York State

Posted 22 May 2003, 06:17

Adding it to the make osc it's own cms list.....

8)

#7 VJ

  • Community Member
  • 173 posts
  • Real Name:VJ
  • Gender:Male

Posted 22 May 2003, 12:12

Quote

how deep can the categories go?

Well, its just a single-level deep as of now. I thought multi-level categorization for links would be an overkill.

VJ

--
http://www.salehut.com

#8 VJ

  • Community Member
  • 173 posts
  • Real Name:VJ
  • Gender:Male

Posted 22 May 2003, 12:18

... and gee, thanks a lot for all your comments :D

VJ

--
http://www.salehut.com

#9 Director of Projects

  • Community Member
  • 26 posts
  • Real Name:Peter McGuire
  • Location:West Germany

Posted 22 May 2003, 13:25

Very good contribution :D

I have the German translation ready by tomorrow could post it.

Did you ever think about, to allow some banners or buttons? Perhaps for a fee?

Once more, well done

Cheers
Technical support is how much a minute? Only one other industry charges $3.99 a minute to talk to you, and at least you get some degree of pleasure out of that!

#10 mazza

  • Community Member
  • 222 posts
  • Real Name:Matti
  • Location:Finland

Posted 23 May 2003, 01:15

Looks real nice. Too bad it is not multilingual so we cannot use it :(

Heres the sql-plan if you are planning to add this feature:

# Links Manager for OSC v0.2



#

# Table structure for table `exchange_links_categories`

#



CREATE TABLE exchange_links_categories (

  link_category_id int(11) NOT NULL auto_increment,

  link_category_contact varchar(96) NOT NULL default '',

  link_category_email varchar(96) NOT NULL default '',

  link_category_rating int(11) default NULL,

  link_category_date datetime NOT NULL default '0000-00-00 00:00:00',

  link_category_status int(1) NOT NULL default '1',

  PRIMARY KEY  (link_category_id)

) TYPE=MyISAM;

# --------------------------------------------------------



#

# Table structure for table `exchange_links_categories_description`

#



CREATE TABLE exchange_links_categories_description (

  link_category_id int(11) NOT NULL auto_increment,

  link_category_name varchar(64) NOT NULL default '',

  language_id int(11) NOT NULL default '0',

  link_category_description text,

  PRIMARY KEY  (link_category_id)

) TYPE=MyISAM;



#

# Table structure for table `exchange_links_links`

#



CREATE TABLE exchange_links_links (

  link_category_id int(11) NOT NULL default '0',

  link_id int(11) NOT NULL auto_increment,

  link_url varchar(255) NOT NULL default '',

  link_contact varchar(96) NOT NULL default '',

  link_email varchar(96) NOT NULL default '',

  link_reciprocal varchar(255) NOT NULL default '',

  link_rating int(11) default NULL,

  link_date datetime NOT NULL default '0000-00-00 00:00:00',

  link_status int(1) NOT NULL default '1',

  PRIMARY KEY  (link_id,link_category_id)

) TYPE=MyISAM;



#

# Table structure for table `exchange_links_links_description `

#



CREATE TABLE exchange_links_links_description (

  language_id int(11) NOT NULL default '0',

  link_id int(11) NOT NULL auto_increment,

  link_title varchar(255) NOT NULL default '',

  link_description text,

  PRIMARY KEY  (link_id,link_category_id)

) TYPE=MyISAM;

"Use no way as way, have no limitation as limitation." - Bruce Lee

#11 VJ

  • Community Member
  • 173 posts
  • Real Name:VJ
  • Gender:Male

Posted 24 May 2003, 11:37

Quote

Looks real nice. Too bad it is not multilingual so we cannot use it

Thanks for your comments :-)

Well, its a shame I didn't give too much thought about making the mod multi-lingual. I might go for it in the next version, though.

Meanwhile, why don't you go ahead and give it a shot. That DB plan looks great :-).

VJ

--
http://www.salehut.com

#12 loxly

  • Community Member
  • 1,802 posts
  • Real Name:Deborah Carney
  • Gender:Male
  • Location:New York State

Posted 24 May 2003, 16:13

Quote

Quote

Looks real nice. Too bad it is not multilingual so we cannot use it

Thanks for your comments :-)

Well, its a shame I didn't give too much thought about making the mod multi-lingual. I might go for it in the next version, though.

Meanwhile, why don't you go ahead and give it a shot. That DB plan looks great :-).

VJ

--
http://www.salehut.com

Exactly what I was thinking, if someone knows how to change the code, why not go ahead and do it and send it to the author instead of making a negative post.

This attitude that contributions, that are made by volunteers, that are free for you to use, need to fit everyone in the world's needs is very discouraging.

If you have a suggestion, make it.

If you know how to fix it, fix it.

If you have a demand, forget it.

#13 mazza

  • Community Member
  • 222 posts
  • Real Name:Matti
  • Location:Finland

Posted 24 May 2003, 17:09

Hmm... Maybe I should have used "unfortunately" instead of "too bad". My apologies if it sounded too negative. That was not my intention as this is one of those rare contributions that has potential to be useful to alot of shops.

However the missing feature does limit its potential to shops with one language.

I would be more than happy to help with the coding as far as I can.
"Use no way as way, have no limitation as limitation." - Bruce Lee

#14 loxly

  • Community Member
  • 1,802 posts
  • Real Name:Deborah Carney
  • Gender:Male
  • Location:New York State

Posted 24 May 2003, 18:48

:) Thanks for clarifying and I apologize for snapping. There is a lot of "demanding" instead of offering and asking going on these days and I made an assumption due to the tone of the note.

What a difference a word makes....

#15 allandk

  • Community Member
  • 16 posts
  • Real Name:Allan
  • Location:Denmark

Posted 25 May 2003, 10:21

Hi VJ,

A great script :D I have 2 questions..

1. I cannot get it to show the category decriptions, what do I need to change ?

2. I have done danish language files, if anyone is interested..

Regards Allan

#16 VJ

  • Community Member
  • 173 posts
  • Real Name:VJ
  • Gender:Male

Posted 25 May 2003, 11:33

Thanks for your compliments, Allan. :)

As regards display of category description, you can find the code that displays category information in /catalog/exchange_links.php,

at around line 95,

    echo '                <td align="left" class="smallText" style="width: ' . $width . '" valign="top"><br> &raquo; <a href="' . tep_href_link(FILENAME_EXCHANGE_LINKS, 'lPath=' . $link_category_data['link_category_id']) . '" class="subCatLinks">' . $link_category_data['link_category_name'] . '</a>&nbsp;(' . $link_count . ')</td>' . "n";

Just add the category description variable $link_category_data['link_category_description'] somewhere in the above code segment.

HTH,
VJ

--
http://www.salehut.com

#17 allandk

  • Community Member
  • 16 posts
  • Real Name:Allan
  • Location:Denmark

Posted 25 May 2003, 13:25

Hi VJ,

I must be doing it wrong. I keep getting parse error ?

regards Allan

#18 VJ

  • Community Member
  • 173 posts
  • Real Name:VJ
  • Gender:Male

Posted 25 May 2003, 17:13

Hi Allan,

Can you please post the code segment you've changed and the segment where you get errors. Its kind of hard to speculate without much to look at.

VJ

#19 allandk

  • Community Member
  • 16 posts
  • Real Name:Allan
  • Location:Denmark

Posted 25 May 2003, 18:48

sorry I uploaded the original file again.. :oops: so it's gone

#20 allandk

  • Community Member
  • 16 posts
  • Real Name:Allan
  • Location:Denmark

Posted 25 May 2003, 22:10

i keep trying.. promise not to laugh at me, i'm new at this

    $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

    echo '                <td align="left" class="smallText" style="width: ' . $width . '" valign="top"><br> &raquo; <a href="' . tep_href_link(FILENAME_EXCHANGE_LINKS, 'lPath=' . $link_category_data['link_category_id']) . <br> . $link_category_data['link_category_description'].'" class="subCatLinks">' . $link_category_data['link_category_name'] . '</a>&nbsp;(' . $link_count . ')</td>' . "n";

    if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != tep_db_num_rows($link_category_query))) {

      echo '              </tr>' . "n";

      echo '              <tr>' . "n";

    }
}
?>