Gossamer Forum
Home : Products : Links 2.0 : Customization :

A how to guide for building a list of Editor's Pick page

(Page 3 of 4)
> > > >
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
In my links.cfg I have this situation:

# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 150, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 17, 17, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
isPick => [14, 'alpha', 0, 5, 0, 'No', 'No|Yes']
);

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_category = 4; $db_modified = 3; $db_url = 2;
$db_hits = 8; $db_isnew = 9; $db_ispop = 10;
$db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
$db_votes = 12; $db_rating = 11; $db_mail = 13;
$db_ispick = 14;

%add_system_fields = (
isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0,
ReceiveMail => 'Yes',
isPick => 'No'
);


%db_select_fields = (
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No',
isPick => 'Yes,No'
);

But it still do not work. What's wrong?
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
It works! Thanks, Eliot!
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
You're welcome.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Have I installed the mod and doesn't one eat to make it work. What should I make to transform it into Site of the Month? Why in nph_build.pl appears:

Code:
Building Site Publishing of Pick. . .
Editor's Picks: 0

Thank you in advance.

Carlos
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
You have to choose "Yes" for a site that you want to be the Site of the Month.

And another adaption to this Mod you will have to make is add another field called 'Award Date'. This field should look like the following:

Code:
'Award Date' => [18, 'alpha', 30, 30, 0, '', '']

Change 18 so that this is the last field number in your %db_def section of your links.def file. Also follow the instructions for adding a field to your links.def and existing links.db files in the FAQ in the Resource Center.

Then fill in a Date, like April 2000 in the admin.cgi file for the Site you are choosing to be the Site of the Month.

Then in the pick.html template file, add the following tag:

Code:
<%Award Date%>

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
As I mentioned to you before...this is an ADMINISTRATOR Mod that allows the SITE ADMINISTRATOR to select the site of the Month award! I mentioned this twice before. Why don't you read my Replies carefully!??!?

*sigh*

I believe the step you are missing is adding the following codes in your site_html_link sub-routine in the site_html_templates.pl file:

Code:
($rec{'isPick'} eq 'Yes') ? ($rec{'isPick'} = 1) : (delete $rec{'isPick'});

Double check the insructions posted in the first Posting in this Topic.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
I have put YES and when I go to the page of the Editor Pick that web appears...

But the problem is that I don't understand like it should work. In the first place I don't understand so that the Editor Pick Mod utility, but neither I understand like I can transform it into a mod of Site of the Month, so that people vote like in Antrotech.com
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Hi,
I installed this mod but for an unknown reason I'm receiving this error message when trying to build the pages:


Cannot find server or DNS Error

The path to nph-build is ok. Other administrative functions seem to work ok also , but this message puzzles me.

Any ideas as to what I should look at?

Manuel

Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Thanks very much for this amazing mod, especially for giving instructions for non-template users. This is a very valuable mod so you should consider compiling it into a nicely written mod.

Simon Dyson

Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
 
Hi Eliot,

Sorry for bringing up this old thread.

I did exactly what you said but no Award Date is showing. What is wrong?

In links.def I have

'Award Date' => [20, 'alpha', 30, 30, 0, '', '']


and


$db_award_date = 20;

In site_html_templates.pl I have


sub site_html_pick {
# --------------------------------------------------------
# This routine will build a editor's pick page.
return &load_template ('pick.html', {
total => $total,
grand_total => $grand_total,
link_results => $link_results,
title_linked => $title_linked,

award_date => $award_date,

%globals
} );
}



In pick.html I have


<%total%>

<%Award Date%>

<%link_results%>


Could you tell me what am I missing?

Thank you.


Regards,
Pagla


Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Uh, that is because you DID NOT DEFINE the $award_date in your site_html_pick routine.

And also, you need to use <%award_date%> NOT <%AwardDate%>[/b] in the pick.html template file.

RE - READ MY EARLIER SUGGESTIONS!

Regards,

Eliot Lee
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
 
Thanks for replying.
In Reply To:
Uh, that is because you DID NOT DEFINE the $award_date in your site_html_pick routine.
What did you mean by that?


Regards,
Pagla

Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
If you search for award_date, you will find what I mean. Wink

Regards,

Eliot Lee
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
I think you are talking about the folowing thread

http://


I tried that but still no date is showing.


Regards,
Pagla


Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Well...I would recommend removing the award_date => $award_date in the sub.

And then simply use <%AwardDate%>. And make sure that you actually have dates in the AwardDate field. If not, then of course, the value will not appear. And the AwardDate field should be in the SAME format as the Date field.

Regards,

Eliot Lee
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
In Reply To:
And the AwardDate field should be in the SAME format as the Date field.
Something like this?


AwardDate => [20, 'date', 15, 15, 1, \&get_date, '']



Thanks.


Regards,
Pagla

Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
 

Do I have to define anything in nph-build.cgi?


Regards,
Pagla

Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
NO...other than adding the subroutine that builds the "award" or "editor pick" page. AGAIN...please refer to the MOD instructions and bug fixes ALREADY posted in this forum.

Regards,

Eliot Lee
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Hi. I'm having problems with installing this mod into an existing database. Everything seems to work fine in regards to the Picks but now the script marks EVERY site as "new" and "pop" in the listings, even though in the admin both are set to "No". My site is here:

http://www.moonprincess.com/senshi

Any suggestions on what I did wrong? I have carefully read all three pages of this thread and made corrections accordingly so I can't think of what could be wrong.

Thanks!
Rebecca

Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
1) You need to UPDATE your existing database file (links.db). Search this forum for upgrade.pl.

2) You also need to RE-NUMBER the IMPORTANT FIELDS section in the links.def (as mentioned in this thread and other Threads in this forum).

3) You also need to make sure that you have followed ALL the instructions in this Thread...and applied the bug fixes.

Bye...

Regards,

Eliot Lee
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
I have already manually editted my existing database (links.db). I have also numbered my new field 14 on links.def (when I number it 16, it doesn't work).

Any other suggestions?

Thanks!
Rebecca

Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Did you ALSO re-number ALL the other IMPORTANT FIELDS??? (in the links.def).

Also, manually updating your links.db leads to corruption and is NOT recommended!

Regards,

Eliot Lee
Quote Reply
Re: A how to guide for building a list of Editor's Pick page In reply to
Didn't follow this thread but you might want to check the following

http://gossamer-threads.com/...ew=&sb=&vc=1

Gene
Quote Reply
I can't get it right In reply to
Hi,

hope someone is still readin this one :-)

I can't find the firest thing (use var...) that's needed to replace. Where is it located? I searched in all the files but it can't find any part of the string nowhere.

Please help, thnx,

DieMonde
Quote Reply
Re: [maky] A how to guide for building a list of Editor's Pick page In reply to
PirateI just don't understand! Is there a full detail information on the Editor's Pick List. The post I look at just jump all over and don't tell you everything. Please help
rexxx webmaster
> > > >