Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • To those I talked to about it...
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
To those I talked to about it...; Holy, Slayer and Kevin mostly lol
Tweet Topic Started: Apr 5 2009, 04:49 AM (392 Views)
PD.Phoenix Apr 5 2009, 04:49 AM Post #1
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
Just wanted to say, I've successfully completed both my comment and rating scripts.

thanx for all the help in the meantime ^^


I've got a question though :3

How would I make each comment collapsible?
Edited by PD.Phoenix, Apr 5 2009, 04:50 AM.
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
slayer766 Apr 5 2009, 06:54 PM Post #2
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Sorry...haven't really had any interest on forums anymore. <_<
Offline Profile Goto Top
 
PD.Phoenix Apr 5 2009, 08:53 PM Post #3
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
S'ok, I finished a 5-star rating script ^^
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
slayer766 Apr 6 2009, 11:32 AM Post #4
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
See I knew you could. XD


Also to answer your question, for the area you have the comment surrounded in, be it a div/span/etc, you would just add an onclick to it(Not sure if you have jQuery on your site for this)

Code:
 
<span onclick='$("#comments").toggle();'>This is what would say Comments - Click to collapse/expand<span id='comments'>This would be the comments</span></span>

Something like that.
Offline Profile Goto Top
 
PD.Phoenix Apr 6 2009, 03:23 PM Post #5
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
the php script didn't like that...

I added it around the piece that makes the comment box and it just threw it into error...

Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
slayer766 Apr 6 2009, 06:31 PM Post #6
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Might be something you've added to the comment section, could you post that bit up?
Offline Profile Goto Top
 
HolySavior Apr 6 2009, 09:33 PM Post #7
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
omg slayer!! where have you been! we need to talk!
Offline Profile Goto Top
 
PD.Phoenix Apr 7 2009, 01:03 AM Post #8
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
dont really know which part you need, but this makes the comments section

Code:
 

//fetches all comments from database where the tutorial number is the one you are asking for
$commentquery = mysql_query("SELECT * FROM comments WHERE tutorialid='$tutid' ORDER BY date") or die(mysql_error());
//finds the number of comments
$commentNum = mysql_num_rows($commentquery);
//creates a headline
echo "<div id=\"currentcomments\" class=\"submitcomment\"><h3 class=\"formtitle\">Current Comments</h3>\n";
echo $commentNum . " comments so far (<a href=\"#post\">post your own</a>)\n";
//for each comment in the database in the right category number...
while($commentrow = mysql_fetch_row($commentquery)){
//for security, parses through the bbcode script
//the number corresponds to the column (the message is always stored in column 4
//COUTING STARTS at 0!!!
$commentbb = BBCode($commentrow[4]);
//creates the right date format
$commentDate = formatDate($commentrow[6]);

echo "<div class=\"commentbody\" id=\"$commentrow[0]\">\n
<p>$commentbb</p>\n
<p class=\"postedby\">Posted by ";
if($commentrow[3]){
echo "<a href=\"$commentrow[3]\">$commentrow[2]</a> ";
} else {
echo "$commentrow[2] ";
}
echo "on $commentDate | #$commentrow[0]</p>\n
\n</div>";

}
echo "</div>";
}

function submitComments($tutid2,$tuturl){
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
PD.Phoenix Apr 8 2009, 05:12 PM Post #9
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
Anyone got any ideas?
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
slayer766 Apr 15 2009, 10:14 AM Post #10
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Alright, so you've given the comment section an id, so what's the code you've used to expand/collapse that section?
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code University · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2

Track Topic · E-mail Topic Time: 7:48 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy