View previous topic :: View next topic |
Author |
Message |
dodo
Joined: 25 Jan 2002 Posts: 35
|
|
Back to top |
|
 |
.Chris
Joined: 30 Apr 2002 Posts: 186 Location: Hawaii
|
Posted: Sat Aug 31, 2002 8:49 pm Post subject: |
|
|
Yummy.. |
|
Back to top |
|
 |
Sansnom
Joined: 31 Jan 2002 Posts: 94 Location: Paris
|
Posted: Sun Sep 01, 2002 5:41 pm Post subject: |
|
|
Great Job !!!
I'm just asking myself if it's possible to format the date (in front of the posts) in a french style.
Example :
"26 juillet 2002 15h12"
instead of
"2002.07.26 15.12.02"
I know I'm too slow to answer, so I hope you will !
Bravo again !!!
S _________________ http://www.sansfin.com |
|
Back to top |
|
 |
annia
Joined: 09 Apr 2002 Posts: 18
|
Posted: Mon Sep 02, 2002 2:55 pm Post subject: |
|
|
looks good dodo :) thanks for sharing!! |
|
Back to top |
|
 |
daynah
Joined: 25 Jan 2002 Posts: 8
|
Posted: Mon Sep 09, 2002 5:51 pm Post subject: |
|
|
Some people are wondering how to format the date to just show the day, rather than all the times. So here's the small modification.
Starting on line 116, replace:
Code: | $postdata = get_postdata2($row->ID);
echo $postdata["Date"]; |
with:
Code: | $postdata = get_postdata2($row->ID);
$post_date = explode(" ", $postdata["Date"]);
echo $post_date[0]; |
What this does is puts the date into an array, separated by a " " (space). So $post_date[0] gets the day, while $post_date[1] gets the time.
I hope that helps! _________________ PHP Princess.net | Daynah.net |
|
Back to top |
|
 |
dille
Joined: 28 Aug 2002 Posts: 9 Location: Netherlands
|
Posted: Fri Sep 13, 2002 8:54 am Post subject: Hm... doesn't work here... |
|
|
I downloaded, expanded and put the b2archivetest.php file in the same dir as my blog. I then changed the settings.
When I visit http://dille.ath.cx/b2archivestest.php (where the file is), I get:
Quote: |
Warning: Access denied for user: 'root@localhost' (Using password: NO) in /Library/WebServer/home/b2archivestest.php on line 29
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in /Library/WebServer/home/b2archivestest.php on line 29
Warning: MySQL: A link to the server could not be established in /Library/WebServer/home/b2archivestest.php on line 29
|
Which is not what it should be. Anyone had this before? |
|
Back to top |
|
 |
daynah
Joined: 25 Jan 2002 Posts: 8
|
Posted: Fri Sep 13, 2002 9:20 am Post subject: |
|
|
I think you have to rename the file to b2archives.php
Else, you can edit line 18:
change:
if ($pagenow == "b2archives.php")
to
if ($pagenow == "b2archivestest.php")
Hope that helps. _________________ PHP Princess.net | Daynah.net |
|
Back to top |
|
 |
Tanner
Joined: 06 Jul 2002 Posts: 55 Location: Germany
|
Posted: Fri Sep 13, 2002 12:58 pm Post subject: |
|
|
Here it only shows:
Warning: Supplied argument is not a valid MySQL result resource in /home/www/web243/html/playground/b2archivestest.php on line 198 |
|
Back to top |
|
 |
dille
Joined: 28 Aug 2002 Posts: 9 Location: Netherlands
|
Posted: Mon Sep 16, 2002 10:18 pm Post subject: |
|
|
daynah: nope, tried that (both options), didn't work. However, in the end I decided to use a different solution anyway, so the problem is gone, sort of =] |
|
Back to top |
|
 |
gambetti
Joined: 24 Sep 2002 Posts: 1
|
Posted: Tue Sep 24, 2002 2:59 pm Post subject: the same prob. :Supplied argument is not a valid |
|
|
I have the same problem after installing and running the script:
Warning: Supplied argument is not a valid MySQL result resource in /.../.../.../kunden/b2/b2archivestest.php on line 101
line 101 is:
100>> } elseif ($archive_mode == "postbypost") {
101>> while($row=mysql_fetch_object($result)) {
102>> $postdata = get_postdata2($row->ID);
103>> $thismonth=mysql2date("Y\-m", $postdata["Date"]);
104>> $linkmonth=mysql2date("Ym", $postdata["Date"]);
anybody a idea?
thanks in advance!!
gambetti |
|
Back to top |
|
 |
Aubrey
Joined: 18 Jun 2002 Posts: 6
|
Posted: Tue Sep 24, 2002 5:39 pm Post subject: |
|
|
I'm getting the same thing... not sure how to fix it, however... _________________ you seem star shaped. |
|
Back to top |
|
 |
chobits
Joined: 25 Sep 2002 Posts: 2
|
Posted: Wed Sep 25, 2002 10:46 pm Post subject: |
|
|
i am also getting an error from line 101
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in ....b2archivestest.php on line 101 |
|
Back to top |
|
 |
daynah
Joined: 25 Jan 2002 Posts: 8
|
Posted: Fri Sep 27, 2002 10:25 pm Post subject: |
|
|
On line 28 or so, find
[php:1:ae25c39cc2]$request = " SELECT * FROM posts WHERE post_date LIKE '$year%' ORDER BY $way $order"; [/php:1:ae25c39cc2]
and replaced it with
[php:1:ae25c39cc2]$request = " SELECT * FROM $tablename WHERE post_date LIKE '$year%' ORDER BY $way $order"; [/php:1:ae25c39cc2]
That should fix the errors.  _________________ PHP Princess.net | Daynah.net |
|
Back to top |
|
 |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Sat Sep 28, 2002 1:23 pm Post subject: |
|
|
dodo,
I love your hack.
How do I get it to show only, say, 10 headlines at once? |
|
Back to top |
|
 |
dodo
Joined: 25 Jan 2002 Posts: 35
|
Posted: Wed Nov 06, 2002 6:17 am Post subject: |
|
|
daynah wrote: | On line 28 or so, find
[php:1:13fec41725]$request = " SELECT * FROM posts WHERE post_date LIKE '$year%' ORDER BY $way $order"; [/php:1:13fec41725]
and replaced it with
[php:1:13fec41725]$request = " SELECT * FROM $tablename WHERE post_date LIKE '$year%' ORDER BY $way $order"; [/php:1:13fec41725]
That should fix the errors.  |
thanks daynah, i make stupid errors. i should probably fix my zip file. _________________ http://pure-essence.net
b2 rocks |
|
Back to top |
|
 |
|