boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hack on a Hack (Dodo's Archives)
Goto page Previous  1, 2
 
Post new topic   Reply to topic    boardom Forum Index -> Feature requests
View previous topic :: View next topic  
Author Message
indiaberry



Joined: 09 Mar 2003
Posts: 8

PostPosted: Mon Mar 10, 2003 7:39 am    Post subject: Reply with quote

ok, this work...but
The only thing in the catogetries drop down box is, "All Categories"

What can I do to put in all the catogetries..so that when a person click a name of catogetries, it um..show only entries in that categories.
Back to top
View user's profile Send private message Visit poster's website
macshack



Joined: 17 Jul 2002
Posts: 1204
Location: Phoenix, Az

PostPosted: Mon Mar 10, 2003 8:11 am    Post subject: Reply with quote

Hi,

The template function
Code:

<?php list_cats(0, '', 'name'); ?>

should give a list of categories ordered by their names.

If you wanted in the list a link for 'All songs' for example, then you could use:
Code:

<?php list_cats(1, 'All songs', 'name'); ?>

_________________
Kind Regards,
Michael e
Back to top
View user's profile Send private message Send e-mail
indiaberry



Joined: 09 Mar 2003
Posts: 8

PostPosted: Mon Mar 10, 2003 8:12 am    Post subject: Reply with quote

qingshuo wrote:
Here it is:

<select class="form" name="cat" style="width:110px;">
<?

$catsResult = mysql_query(" SELECT * FROM qnetb2categories ");

while ( $catRow = mysql_fetch_array($catsResult) ) {
echo '<option value="'.$catRow["cat_ID"].'"';
if($cat == $catRow["cat_ID"])
echo ' selected="selected"';
echo '>'.$catRow["cat_name"]."</option>\n";
}

echo '<option value="all_cats"';
if($cat == "all_cats")
echo ' selected="selected"';
echo ">All Categories</option>\n";

remove the "qnet" off bnetb2categories if you want it to show all the name of categories. Now I know, just helping other out.
Back to top
View user's profile Send private message Visit poster's website
neil



Joined: 12 Apr 2003
Posts: 9

PostPosted: Tue Apr 15, 2003 12:37 am    Post subject: Reply with quote

i'm sure this is probably not too difficult, but i'm not too good with PHP so bear with me...

i haven't actually implemented this yet, but i plan on using b2 to power an events calendar -- using the same hacks that others have used to enable posts in the "future" appear.

with this in mind, i'd like to use this code to sort my event entries, but only events that occur from the current date or later. essentially, is there any way to implement this sorting code with the current blog?

i understand that i can already sort by category for current posts, etc, but i'd like to be able to sort current posts by other criteria, like title or possibly even customfields.

i hope i'm making sense...my brain has been flooded with ideas since i've thought about implementing b2 on sites other than "standard" blogs.
Back to top
View user's profile Send private message AIM Address
nullswitch



Joined: 07 Mar 2003
Posts: 14
Location: Carnegie Mellon, Pittsburgh

PostPosted: Thu Apr 24, 2003 10:33 pm    Post subject: Reply with quote

I'm not getting anyoutput at all Sad Basically, I get the form and thats it- no database output. The original b2archives.php works fine but yours and Dodo's just sit there...

Installation problem? It might be that the query is returning anything....
_________________
"Whatever you do, at least be of some use"
Back to top
View user's profile Send private message Visit poster's website
qingshuo



Joined: 03 Jan 2003
Posts: 10
Location: Edina-Bloomington/MN/USA

PostPosted: Sat Apr 26, 2003 5:55 pm    Post subject: Reply with quote

Yeah, I use database/tablenames different from the default, and some of the "qnet" stuff seeped into the code. My apologies =\

Just search/replace and comb out all the "qnet"'s and things should be fine =\
Back to top
View user's profile Send private message Visit poster's website AIM Address
dodo



Joined: 25 Jan 2002
Posts: 35

PostPosted: Fri May 09, 2003 11:51 pm    Post subject: Reply with quote

hey good job.. what's movement?
_________________
http://pure-essence.net

b2 rocks
Back to top
View user's profile Send private message Visit poster's website
gooified



Joined: 09 Jul 2003
Posts: 19

PostPosted: Thu Oct 30, 2003 7:47 pm    Post subject: Reply with quote

I'm getting this error:

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/gooified/public_html/b2/b2archives.php on line 111



...line 111 is this:
while($row=mysql_fetch_object($result)) {



??
Back to top
View user's profile Send private message Visit poster's website
sayiklamalar



Joined: 23 Apr 2003
Posts: 6
Location: Turkey

PostPosted: Wed Feb 02, 2005 8:33 pm    Post subject: Reply with quote

hi!

i found this code after a big tiredness. couse the original code (dodo's one) not reachable with the adress given. if i can find someone to answer my question i'll be glad.

i want to see author names in the order, near the date. but i couldn't write the correct sql query for it.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Feature requests All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group