HELP ME! Anonymous Commenting and Numbering !!
Posted: 23 June 2004 02:54 AM   [ Ignore ]  
Summer Student
Total Posts:  10
Joined  06-20-2004

Hello, PHP master, please help me….

This is my question.

1. I want to numbering to user in comments filed.

for example

————
1. name1 , 2004 06 04

brahbrahbrah.

————

2. name2 , 2004 06 05

brabrabrabrabra.

————-

like this, and I tried to wrote some php code.
but it does’n t work…. so ,how should I write for??
(I dont want to use <li> tag, because of design issue.)


2. And I have another question,

I want to replace anonymous user name for “Anonymous”,
Becouse when I was using MT, I allow user to comment anonymously,
(I mean I didn’t require Name, or E-mail, besides comment itself.)

Then, I imported old data from MT, name field turned just blank.
so I want to change blank to “Anonymous”.

This is my broken PHP code.

{exp:comment:entries}

<? php for($j = 0; $j++);

<span class=“posted”>

$j .

if(!$name) $name=“Anonymous”;

{url_or_email_as_author}  
{comment_date format=’%y/%m/%d’} {comment_date format=’%H:%i’}
</span>

<p>{comment}</p>

?>

{/exp:comment:entries}

Please help me!!

Profile
 
 
Posted: 23 June 2004 09:39 AM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

1. I would still suggest a simple HTML ordered list (<ol> and <li>).  Simply use CSS to determine how it is displayed.  You can remove the indent, etc.


2. You should probably go into the database and replace all the blank names with “Anonymous”.  You could try running a SQL query like this to do so:

UPDATE exp_comments SET name='Anonymous' WHERE name=''

Definitely make a backup of the database before performing any global updates like this.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 23 June 2004 10:00 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  10
Joined  06-20-2004

2. I just finished replace blank name , thanks for good idea!

1. Yes, I know it’s better to use <li> tags.
but it looks different between several browser… despite use CSS.

If someone has good idea, please help me !
Any info will be appriciated.

Profile
 
 
Posted: 23 June 2004 11:44 PM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

If you post what sort of output you’d like to see, then I bet someone can tell you the CSS to use to get it.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 24 June 2004 12:19 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  10
Joined  06-20-2004

Thank you Chris, what I’d like to see is ..

——————————————————
1. Name 04/06/20 12:00

  brabrabrabra

——————————————————-

like this. and the reason why I don’t want to use CSS is
a margin between Number and Name.

This is my site’s looking.

——————————————————
1.    Name 04/06/20 12:00

  brabrabrabra

——————————————————-

I know there is marker-offset tag,
but it is not yet supported by any browser.
http://www.csscreator.com/attributes/properties/marker-offset

If someone has good idea, any info will be appreciated.
Thank you again.

Profile
 
 
Posted: 24 June 2004 12:21 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  10
Joined  06-20-2004

woops,, I’m sorry.

This is my site’s looking.

——————————————————
1. (margin) Name 04/06/20 12:00

brabrabrabra

——————————————————-

*(margin) means just white space.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62709 Total Logged-in Users: 44
Total Topics: 77311 Total Anonymous Users: 28
Total Replies: 417250 Total Guests: 285
Total Posts: 494561    
Members ( View Memberlist )