Gossamer Forum
Home : Products : DBMan : Customization :

Please Help with my class-ads

Quote Reply
Please Help with my class-ads
Hello,

I am trying to create class-ads site using dbman.
You can see the sample and try to use it at : miniads.hypermart.net

Question:
1. I created links to search per category. How to show the latest ads first (by date)?
2. There is a problem with adding the new ads. After successful adding, the confirmation is sometimes blank. What is the cause of this?
3. I create one field for hour or time of posting. How to define it?
4. How to make email clickable?
5. I want to create a link that show the ads posted today. Can you help me with the code?

I am not programmer so please explain it step by step.

Thanks for your help.

Erap
Quote Reply
Re: Please Help with my class-ads In reply to
1) Sort records by the field number of your Date Field, using the sb hidden field. For more information on this query argument, search the forum.

2) You probably have embedded form codes within other form codes...Make sure that you do not have extra </form> codes in the confirmation codes.

3) Define it as numer in the type column in the db_def section of your default.cfg file...Then you will have to use &get_time for the default value column in this Time field.

4) Uh...pretty damn easy, like has been discussed MANY times in this forum....Add the following codes in the sub html_record or sub html_record_long:

Code:
<a href="mailto:$rec{'EmailField'}">$rec{'EmailField'}</a>

Change EmailField to the exact name of your Email field in the db_def section in the default.cfg file.

5) Search this forum for Number of Records per day. Codes are in this Forum.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------









Quote Reply
Re: Please Help with my class-ads In reply to
Thanks Elliot.

I still have problem:

1. I use this code to list all ads in one category sorted by date. Bur it does not work? What is wrong
Code:
<p align="center"><a href="http://miniads.hypermart.net/cgi-bin/iklanbaris/db.cgi?uid=default&view_records=1&Category=Car&sb=descend" target="rbottom">Car</a></p>

2.I searched the forum but I can not found the code for listing all new entries of today and yesterday. Because I want to show all news ads entered for today and yesterday.
Please help.

Thanks.
Erap
Quote Reply
Re: Please Help with my class-ads In reply to
1) You are screwing up the sort order and sort by arguments...

Use the following:

Code:
&sb=2&so=ascend

Change 2 to the field number of your Date field.

So, the complete link would look like the following:

Code:
<p align="center"><a href="http://miniads.hypermart.net/cgi-bin/iklanbaris/db.cgi?uid=default&view_records=1&Category=Car&sb=2&so=ascend" target="rbottom">Car</a></p>

Again...change 2 to the field number of your Date field.

2) Search for the following keywords....

Search Records New By Date

Regards,

------------------
Eliot Lee
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------













[This message has been edited by JPDeni (edited April 21, 2000).]
Quote Reply
Re: Please Help with my class-ads In reply to
Elliot,

I still cannot find to create a link which list all todays or yesterday entry.

Do i have to install whats new mod?

Is there any simple way to list all todays entry?

Thanks for your help.

Erap

[This message has been edited by erap (edited February 16, 2000).]
Quote Reply
Re: Please Help with my class-ads In reply to
   
Quote:
I still cannot find to create a link which list all todays or yesterday entry.

Geez...I know that the search engine is a bit cumbersome...but codes have been posted to do this...Before I re-post the codes...

Would you please take a look at the following web page:

http://anthrotech.com/...=res&uid=default

Then conduct a search by selecting Applied Anthropology in the Category search field. Look at the top select drop-down menus...Notice that I have two drop-down menus...Number of Days and Categories?? Is this something that you would like??

Quote:
Do i have to install whats new mod?

Yes.

Regards,

------------------
Eliot Lee
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------













[This message has been edited by Eliot (edited February 16, 2000).]

[This message has been edited by Eliot (edited February 16, 2000).]
Quote Reply
Re: Please Help with my class-ads In reply to
Wow Eliot, I feel your anger here in Holland, but I thought you mostly refer the people to the site of Carol.
ERAP, look here: http://www.jpdeni.com/...n/Mods/newrecord.txt and try to ask one thing at a time. I'm quite sure, when you search this great forum for almost any problem you have by setting up this script, you will have more than ten topics to deal with.
Quote Reply
Re: Please Help with my class-ads In reply to
Well...Carol has not been here in awhile...So, I refer people to the forum.

Thanks for chimming in...

Smile

Regards,

------------------
Eliot Lee
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------











Quote Reply
Re: Please Help with my class-ads In reply to
RIGHT!! AND YOU CAN LINK TO THE RECORDS AS I HAVE SHOWED YOU!!!!!!!!!!!!!!!!!!!!!!!!!!

I GAVE YOU AN EXAMPLE OF THE FORM TO SHOW YOU WHAT TYPE OF RESULTS YOU CAN GET!!!!

GEEZ!!!!!!!!!!!!!!!!!!!

ARE THE RESULTS FROM THE EXAMPLE SOMETHING THAT YOU WANT??? (THINK OF RESULTS NOW...NOT THE PROCESS OF GETTING THERE!!!)

Look at this example since you D.F.G.I:

Records Added in Last Three Days

anthrotech.com/cgibin/career/res/index.cgi?db=res&uid=default&Validate=Yes&Category=&sb=1&so=descend&vr=1&new=3

Dah...and what is this...a link...WOW...What a concept!

And then take a look at this example:

Records Added Today

anthrotech.com/cgibin/career/res/index.cgi?db=res&uid=default&Validate=Yes&Category=&sb=1&so=descend&vr=1&new=1

Hmm...why is there a Search Failed? Oh, my goodness...I have not added any records today. And again...what is that...a link...what concept.

Now, the only drawback with this type of Mod is that it does not work with keywords and (only with specific fields).

YOU CAN ADD ARGUMENTS LIKE &new=1 to show the number of new records in the query string, just like you do for the sorting by date!!!!!!!!! (after installing this modification).

If this is not want you want...I have no more energy nor patience to deal with you! (Either learn some Perl, so that you understand the basics of "query string", "variable", "arguments", etc.)

Best of luck!

Regards,

------------------
Eliot Lee
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------













[This message has been edited by Eliot (edited February 17, 2000).]
Quote Reply
Re: Please Help with my class-ads In reply to
Elliot,

What I need is a simple link to list all todays and yesterday entries sorted by ID# in descending order?

Thanks,

Erap
Quote Reply
Re: Please Help with my class-ads In reply to
BTW,
I'm very worried of her, have you ANY idea how her health is, I know, that in the end of november last year, she had some serious headache or so and was away of here also for a few weeks. Now its almost three months and still no sign...
Have you any info for all of us here on the UBB, please let us know (in a new topic).

Thanks anyway.
----------
Mart.
Quote Reply
Re: Please Help with my class-ads In reply to
Eliot,

The mod is already working fine, I can list the newest addition.

But I try your code for todays entry, is say "unknow action". I try new=1, new=2, etc, the mesage is the same. Any other mod should be installed?


Code:
http://miniads.hypermart.net/cgi-bin/iklanbaris/db.cgi? db=default&uid=default&Validate=Yes&Category=&sb=1&so=descend&vr=1&new=1

Thanks
Quote Reply
Re: Please Help with my class-ads In reply to
Yes...but the starting point is the What's New Mod....

In order for the "&new=1" to work, you have to add the following codes in your sub query routine in the db.cgi file:

Code:
#############################################################
# Added Whats New and Records Search Option
#############################################################

if ($in{'new'} > 1) {
$in{'DatePosted-gt'} = &get_date(time() - (($in{'new'}+1) * 86400));
}
elsif ($in{'new'} == 1) {
$in{'DatePosted'} = &get_date();
}
if ($in{'whats_new_records'}) {
open (DB, "<$db_file_name") or &cgierr("error in search.
unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
@lines = <DB>;
close DB;
$number_of_records = scalar(@lines);
$target_record = $lines[$number_of_records - ($in{'whats_new_records'}+1)];
@data = &split_decode($target_record);
$in{"$db_key-gt"} = $data[$db_key_pos];
}

Change DatePosted to the name of your Date Added field.

Better bookmark this Thread, people...because I refuse to add these codes ever again.

Wink

Regards,

------------------
Eliot Lee
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------