Jump to content

Monkuar

Members
  • Posts

    987
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Monkuar

  1. Can somone start the form out for me im very lost, i could finish it.. Thanks phpfreaks.com..
  2. I cant use xhtml only html Can u start the form for me, I can finish i hope and i can hope i use html
  3. I got the variables down and everything it works I even tested it!! But I want it to send the message when somone fills it out instead of everytime i refresh it sends the message, lol thanks $SDK->write_pm ("1", "Hello!", "Hello! This is a test message sent to user id 1"); Currently everytime i refresh my page it sends this message to user id 1 of my forum [witch is me] and title: Hello! and message next.. How can i put this into a form so people can fill out what to say and to who and click submit.. so it doesnt send message everytime u refresh. here is the function for it: function write_pm($to_id, $title, $message, $cc = array(), $sentfolder = '0') { if (!$this->is_loggedin()) { $this->sdkerror($this->lang['sdk_membersonly']); return FALSE; } if (!$to_id) { $this->sdkerror($this->lang['sdk_pm_no_recipient']); return FALSE; } if (!$title OR strlen($title) < 2) { $this->sdkerror($this->lang['sdk_pm_title']); return FALSE; } if (!$message OR strlen($message) < 2) { $this->sdkerror($this->lang['sdk_pm_message']); return FALSE; } $sendto = array(); $this->DB->query("SELECT m.name, m.id, m.view_pop, m.mgroup, m.email_pm, m.language, m.email, m.msg_total, g.g_use_pm, g.g_max_messages FROM ibf_groups g, ibf_members m WHERE m.id='" . intval($to_id) . "' AND g.g_id=m.mgroup"); if ($row = $this->DB->fetch_row()) { // Just incase if (!$row['id']) { $this->sdkerror($this->lang['sdk_pm_mem_notexist']); return FALSE; } // Permissions Check if ($row['g_use_pm'] != '1') { $this->sdkerror($this->lang['sdk_pm_mem_disallowed']); return FALSE; } // Space Check if ($row['msg_total'] >= $row['g_max_messages'] AND $row['g_max_messages'] > 0) { $this->sdkerror($this->lang['sdk_pm_mem_full']); return FALSE; } // Block Check if ($this->is_pmblocked($GLOBALS['ibforums']->member['id'], intval($to_id))) { $this->sdkerror($this->lang['sdk_pm_mem_blocked']); return FALSE; } // CC Users $ccusers = array(); if ($GLOBALS['ibforums']->member['g_max_mass_pm']) { if (is_array($cc) AND count($cc) > 0) { if (count($cc) > $GLOBALS['ibforums']->member['g_max_mass_pm']) { $this->sdkerror($this->lang['sdk_pm_cclimit']); return FALSE; } foreach ($cc AS $i) { // Check CC user stuff // I really should clean up the code here, it uses alot of queries in some cases, which isn't good. Should really merge this with the main sending message code instead of replicating stuff for CCs. $this->DB->query("SELECT m.name, m.id, m.view_pop, m.mgroup, m.email_pm, m.language, m.email, m.msg_total, g.g_use_pm, g.g_max_messages FROM ibf_groups g, ibf_members m WHERE m.id='" . intval($to_id) . "' AND g.g_id=m.mgroup"); if ($ccrow = $this->DB->fetch_row()) { // Permissions Check if ($ccrow['g_use_pm'] != '1') { $this->sdkerror($this->lang['sdk_pm_rec_disallowed']); return FALSE; } // Space Check if ($ccrow['msg_total'] >= $ccrow['g_max_messages'] AND $ccrow['g_max_messages'] > 0) { $this->sdkerror($this->lang['sdk_pm_rec_full']); return FALSE; } // Block Check if ($this->is_pmblocked($GLOBALS['ibforums']->member['id'], intval($to_id))) { $this->sdkerror($this->lang['sdk_pm_rec_blocked']); return FALSE; } } $ccusers[] = intval($i); } } } // Actually send it $ccusers[] = intval($to_id); foreach ($ccusers as $recipient) { $DBstring = $GLOBALS['std']->compile_db_string(array('member_id' => $recipient, 'msg_date' => time(), 'read_state' => '0', 'title' => $title, 'message' => $GLOBALS['std']->remove_tags($message), 'from_id' => $GLOBALS['ibforums']->member['id'], 'vid' => 'in', 'recipient_id' => $recipient, 'tracking' => '0', )); // Insert $this->DB->query ('INSERT INTO ibf_messages (' . $DBstring['FIELD_NAMES'] . ') VALUES (' . $DBstring['FIELD_VALUES'] . ')'); unset($this->DBstring); $this->DB->query("UPDATE ibf_members SET msg_total = msg_total + 1, new_msg = new_msg + 1, msg_from_id='" . $GLOBALS['ibforums']->member['id'] . "', show_popup='1', msg_msg_id='" . $this->DB->get_insert_id() . "' WHERE id='" . $recipient . "'"); } if ($sentfolder) { $DBstring = $GLOBALS['std']->compile_db_string(array('member_id' => $GLOBALS['ibforums']->member['id'], 'msg_date' => time(), 'read_state' => '0', 'title' => 'Sent: ' . $title, 'message' => $GLOBALS['std']->remove_tags($message), 'from_id' => $GLOBALS['ibforums']->member['id'], 'vid' => 'sent', 'recipient_id' => $recipient, 'tracking' => '0', )); $this->DB->query ('INSERT INTO ibf_messages (' . $DBstring['FIELD_NAMES'] . ') VALUES (' . $DBstring['FIELD_VALUES'] . ')'); } return TRUE; } else { $this->sdkerror($this->lang['sdk_pm_mem_notexist']); return FALSE; } } if u needed that just incase ;p; Everything thing works I just need know how to make a form so people can fill it out and press submit for it to work instead of refreshing page and then it load all the time..
  4. HOLY MONKEYS!! I GOT IT!! <img src="gold.gif" style="cursor:hand" style="cursor:hand" onclick="sendGold('$username',event)""></a> I ONLY HAD TO USE ' and not " WOW JAVASCRIPT IS EPIC WIN!! SO GODLY LANGUAGE THANKS MAN! 333
  5. I did: <img src="gold.gif" style="cursor:hand" style="cursor:hand" onclick="sendGold("{$username}",event)""></a> Now I got : Btw {$username} is a user of who posted on the side of my forum. And i stil get erorr: syntax error [break on this error] sendGold( All i want to do is to beable to use letters instead of numbers here: function sendGold(id,event) { Like id is just a variable but it only accepts numbers i want to use letters i tried quote and also here sendGoldForm.username.value=id; i want that to accept letters too
  6. Ok look: //Send Gold time baby here we come my nig'a @@ function nGold($username="") { global $ibforums; $IPBHTML = ""; $IPBHTML .= <<<EOF <img src="gold.gif" style="cursor:hand" style="cursor:hand" onclick="sendGold({$username},event)""></a> {$username} EOF; return $IPBHTML; } That's my skin_xx.php file for : $row['nGold'] = $this->html->nGold($row['name']); Here is my JAVASCRIPT FILE: var goldOn = false; var gAuthkey=''; function sendGold(username,event) { var itm = expMenu("nGold"); goldOn = !goldOn; if(goldOn && itm) { if(itm.innerHTML=="") itm.innerHTML = "<legend>Quick Send Forum Gold<a href='javascript:sendGold()' class='hs'><img src='images!!/x.gif'></a></legend><form name='sendGoldForm' action='index.php?&act=shop&func=transfer_money&code=send' method='post' target='_blank'><input type='hidden' name='username' value='0'><table class='ftbt'><tr><td align=right>Gold Give Amount:</td><td><input type=text name='money' maxlength=7 size=7></td></tr><tr><td align=right>Optional Comments:</td><td><textarea name=post cols=20 rows=4></textarea></td></tr><tr><td align=center colspan=2><br><input type='submit' value='Submit Gold Transfer' name='submit' onclick='sendGold()'><br><br></td></tr><tr><td align=center colspan=2><a href='index.php?act=purchaseGold'>Purchase More Forum Gold</a></td></tr></table></form>"; itm.style.left=event.clientX + (window.pageXOffset!=undefined?window.pageXOffset:document.body.scrollLeft)+"px"; itm.style.top=event.clientY + (window.pageYOffset!=undefined?window.pageYOffset:document.body.scrollTop)+"px"; itm.style.zIndex="100"; sendGoldForm.username.value=username; } } It wont work if I use onclick="sendGold({$username},event)"... I have to use a number like onclick="sendGold(215125,event)" or any number to make it work?? Because then if I do let's say onclick="sendGold(monkuar,event)" then it just gives me this... monkuar is not defined [break on this error] sendGold(monkuar, event); but i need it to be work with letters and not just numbers because my code in javascript i posted above does this: <legend>Quick Send Forum Gold<a href='javascript:sendGold()' class='hs'><img src='images!!/x.gif'></a></legend><form name='sendGoldForm' action='index.php?&act=shop&func=transfer_money&code=send' method='post' target='_blank'>[u][i][b]<input type='hidden' name='username' value='0'>[/b][/i][/u]<table class='ftbt'><tr><td align=right>Gold Give Amount:</td><td><input type=text name='money' maxlength=7 size=7></td></tr><tr><td align=right>Optional Comments:</td><td><textarea name=post cols=20 rows=4></textarea></td></tr><tr><td align=center colspan=2><br><input type='submit' value='Submit Gold Transfer' name='submit' onclick='sendGold()'><br><br></td></tr><tr><td align=center colspan=2><a href='index.php?act=purchaseGold'>Purchase More Forum Gold</a></td></tr></table></form>"; The bolded part is wat i need the value= to be the members name.. but javascript wont let me do that only letters? Anyone else confused like me? Help!
  7. Seriously, all caps in titles are freaking annoying as all hell. And it is against the rules/terms of service you did agree to when registering/logging in: #2 under the Forum Guidelines So please, do not do it as you are saying your matter is more important than someone else's. If it is that urgent post in the freelance section and pay someone to do it. Honestly, I ignore all posts that have caps in the title due to the disrespect it gives other users who obey the rules. Following the guidelines will help your topic get answered faster than not following them. And being an asshole certainly will not motivate anyone to help you out. Thanks. didnt even read it, lol
  8. Yes it will it will make people seem more motivated. dont tell me on how to live my life on the internet..
  9. I can actually do whatever I want to get your attention, Thanks tho brotha! Anyone else help me on this issue thx?
  10. Sir sorry, But i need you to spit the code back out for me so i can easily read it and copy it pasta back in if you dont mind, I know your mind is 100x smarter then monkuar's GOd please.. Thanks bro!! Bring your friends to this topic immediateness i need help i can get!! Thanks again! God blesS!
  11. This code was made by my friend in 2002 LOL It works fine but it easily hackable too I heard? We used escape strings to to try to clean it up but ya.. Sir please I really need your guys help.. ThankS!
  12. Ok on my Forum gold system.. I Grab the username.. so like USER: input username here Money: input money here Comment: comment goes here //------------------------------------------------------------- // Transfer money //-------------------------------------------------------------- if ($func=="transfer_money") { if ($code=="") { $templateform = loadtemplate("shop_transfer_money_1"); eval(template); $output = $templateform; print_and_exit(); } elseif ($code=="send") { global $HTTP_POST_VARS; if (!isset($HTTP_POST_VARS["money"]) OR !is_numeric($HTTP_POST_VARS["money"]) OR $HTTP_POST_VARS["money"]<=0) { shoperror("Sorry, you can't 0 {$ibforums->vars["shop_currencyname"]}, or a negative amount, nice try though!"); } if ($HTTP_POST_VARS["money"] > $ibforums->member["points"]) { shoperror("You do not have enough {$ibforums->vars["shop_currencyname"]} to send " . currencyformat($HTTP_POST_VARS["money"])); } $money = $HTTP_POST_VARS["money"]; if (!isset($HTTP_POST_VARS["username"])) { shoperror("You must enter a member to send {$ibforums->vars["shop_currencyname"]} to!"); } $username = addslashes($HTTP_POST_VARS["username"]); $DB->query("SELECT id FROM ibf_members WHERE name='". mysql_real_escape_string($username) ."' LIMIT 1"); if ($DB->get_num_rows()==0) { shoperror("Recipient does not exist, correct spelling?"); } if (isset($HTTP_POST_VARS["post"])) { $PM_MSG = htmlspecialchars($HTTP_POST_VARS["post"]); } $id = $DB->fetch_row(); $id = $id["id"]; $money_new = currencyformat($money); $timestamp = date("F j, Y, g:i a"); $month = date(F); $year = date(Y); $DB->query("UPDATE ibf_members SET points = points + ". mysql_real_escape_string($money) ." WHERE id='" . mysql_real_escape_string($id) . "' LIMIT 1"); $DB->query("UPDATE ibf_members SET points = points - ". mysql_real_escape_string($money) ." WHERE id=". mysql_real_escape_string($ibforums->member["id"]) ." LIMIT 1"); $DB->query("INSERT INTO `ibf_logs` (`sender_id` ,`receiver_id` ,`amount` ,`date_time` ,`message`,`month`,`year`) VALUES (' ". mysql_real_escape_string($ibforums->member["id"]) ."', '". mysql_real_escape_string($id) ."', '". mysql_real_escape_string($money_new) ."', '". mysql_real_escape_string($timestamp) ."', '". mysql_real_escape_string($PM_MSG) ."', '". mysql_real_escape_string($month) ."', '". mysql_real_escape_string($year) ."');"); shop_addlog(array("type" => "M", "targetmemberid" => $id, "actiontext" => "Transfered {$money} {$ibforums->vars["shop_currencyname"]}" )); $post = ""; if (isset($HTTP_POST_VARS["post"])) { $message = htmlspecialchars($HTTP_POST_VARS["post"]); } $recipient = $username; $sender = $ibforums->member["name"]; global $std; $timestamp = $std->get_date(time(), "LONG"); $servicebotname = $ibforums->vars["shop_botname"]; $currencyname = $ibforums->vars["shop_currencyname"]; $currency = currencyformat($money); $templateform = loadtemplate("transfer_money_pm"); eval(template); $pm = $templateform; unset($templateform); global $std; $pm = $std->clean_value($pm); send_pm(array("recipientid" => $id, "title" => "{$ibforums->member["name"]} has sent you Forum Gold!", "message" => $pm, "senderid" => $ibforums->member["id"])); redirect("{$currency} sent to {$recipient}", "act=shop"); exit; } else { shoperror("Contact your board administrator and ask to be banned... no messing with board input "); } } I want it to be like.. USER ID: input userID here Money: input money here Comment: comment goes here ~~~~ So then they put in the user ID OF THE USER Instead of the username!! Help! Thanks <3 This is the code taken out of the original to seem less complicated, sorry. // Transfer money //-------------------------------------------------------------- if ($func=="transfer_money") { if ($code=="") { $templateform = loadtemplate("shop_transfer_money_1"); eval(template); $output = $templateform; print_and_exit(); } elseif ($code=="send") { global $HTTP_POST_VARS; if (!isset($HTTP_POST_VARS["money"]) OR !is_numeric($HTTP_POST_VARS["money"]) OR $HTTP_POST_VARS["money"]<=0) { shoperror("Sorry, you can't 0 {$ibforums->vars["shop_currencyname"]}, or a negative amount, nice try though!"); } if ($HTTP_POST_VARS["money"] > $ibforums->member["points"]) { shoperror("You do not have enough {$ibforums->vars["shop_currencyname"]} to send " . currencyformat($HTTP_POST_VARS["money"])); } $money = $HTTP_POST_VARS["money"]; if (!isset($HTTP_POST_VARS["username"])) { shoperror("You must enter a member to send {$ibforums->vars["shop_currencyname"]} to!"); } $username = addslashes($HTTP_POST_VARS["username"]); $DB->query("SELECT id FROM ibf_members WHERE name='". mysql_real_escape_string($username) ."' LIMIT 1"); if ($DB->get_num_rows()==0) { shoperror("Recipient does not exist, correct spelling?"); } if (isset($HTTP_POST_VARS["post"])) { $PM_MSG = htmlspecialchars($HTTP_POST_VARS["post"]); }
  13. If i make a variable in PHP.. and I have a external .js file i can call variable in my external .js to work with my php variable right?
  14. No it's just the stupid: if($counter ==1) {$buddylist .= "<td>";} $buddylist .= "<div align=left></a><a href='index.php?showuser={$r['contact_id']}'>{$r['contact_name']}$desktop</a>$av</div>"; if($counter++ >5) {$buddylist .="</td>";$counter=1;} else {$buddylist .= "";} it's not a css because it's just inside a basic fieldset tag dont worry about that worry about php plz, lol This is what i want it to look like Thank u sir. : something like this And if they dont have a avatar it doesnt ruin it like my code does.
  15. Here is my problem, im calling them from mysql, and letting them pop out like this: Only 1 problem that looks like shit, lol I need a way to make it go: 2 Users show up on each line: kinda confusing? Well i mean like Steve User1 <br> User 2 User 3 <br> User 9 User 10 <br> I want ti nice and beautiful like that, BUT MY PHP Code is not making it do that it's making all there names scattered around like the above image! here is my code //monkuar // Buddy List - monkuar $rank = 'rank'; { $DB->query("SELECT * FROM ibf_contacts c, ibf_members m WHERE member_id='".$member['id']."' AND c.contact_name=m.name ORDER By $rank LIMIT 6"); while($r = $DB->fetch_row()) { //monkaur'd if ($r['desktop']) { $desktop = "<img src='{$r['desktop']}'> "; } else { $desktop = ''; } //monkuar'd if ($r['monkavatar']) { $av = " </a><br><img src='{$r['monkavatar']}' width='54' height='54' alt='' /> "; } else { $av = ''; } if($counter ==1) {$buddylist .= "<td>";} $buddylist .= "<div align=left></a><a href='index.php?showuser={$r['contact_id']}'>{$r['contact_name']}$desktop</a>$av</div>"; if($counter++ >5) {$buddylist .="</td>";$counter=1;} else {$buddylist .= "";} } } if ($buddylist != "") { $this->output = str_replace( "<!-- Monkfriends -->", $buddylist, $this->output ); } // Buddy List //monkuar It output's it with this code: if($counter ==1) {$buddylist .= "<td>";} $buddylist .= "<div align=left></a><a href='index.php?showuser={$r['contact_id']}'>{$r['contact_name']}$desktop</a>$av</div>"; if($counter++ >5) {$buddylist .="</td>";$counter=1;} else {$buddylist .= "";} Can you help me make it so it output's like this: Steve User1 <br> User 2 User 3 <br> User 9 User 10 <br> Thanks PHPFREAKS.COM !! please HEPL <3 [EDIT:] The image under steve just show's that a user has an Avatar srry about that.
  16. U added the "static" thing witch iuno wth hell it does but it's a godly function for php I love it i sacred this row code u gave me.. It took me over 1.3years to figure this out and u just give it to me in like 5minutes.. your a smart man keep this up bro you will go far thank u again,.
  17. ROFLMAO@@@@@@@@@ HOLY SHIT IT WORKED OMG WHAT"S YOUR PAYPAL I GIVE U $$ NOW DOOD ADD ME ON MSN I GIVE U MONEY WAT IS IT HOW MUCH U WANT USD OR WAT?? OMG GOD BLESS U THANK U SO MUCH GODLY U ARE!! i did this: <tr class="$color"> and it actually WORKS OMG: LOLOL EPIC <3333333333333
  18. Nope only once Sir please is it ok if I setup an ftp account for you so u can access my whole forum and script's and see if u can try to fix it sir please? here is something imght help.. it get's called 3 times in boards.php tho.: return $this->html->ForumRow($forum_data, $subinfo); then return $this->html->ForumRow($forum_data, $newest, $subinfo); return $this->html->ForumRow($forum_data);
  19. Ok hang in there please bro.. Ok here is the "Render forum row": function process_forum($forum_id="", $forum_data="") { global $std, $ibforums, $DB; if ($forum_data['subwrap'] == 1) { $printed_children = 0; $can_see_root = FALSE; //-------------------------------------- // This is a sub cat forum... //-------------------------------------- // Do we have any sub forums here? if ( (isset($this->children[ $forum_data['id'] ])) and (count($this->children[ $forum_data['id'] ]) > 0 ) ) { // Are we allowed to see the postable forum stuff? if ($forum_data['sub_can_post'] == 1 and $forum_data['redirect_on'] != 1) { if ( $std->check_perms($forum_data['read_perms']) ) { $forum_data['fid'] = $forum_data['id']; $newest = $forum_data; $can_see_root = TRUE; if (isset($forum_data['last_title']) and $forum_data['last_id'] != "") { if ( ( $ibforums->vars['index_news_link'] == 1 ) and (! empty($ibforums->vars['news_forum_id']) ) and ($ibforums->vars['news_forum_id'] == $forum_data['id']) ) { $this->news_topic_id = $forum_data['last_id']; $this->news_forum_id = $forum_data['id']; $this->news_title = $forum_data['last_title']; } } } else { $newest = array(); } } foreach($this->children[ $forum_data['id'] ] as $idx => $data) { //-------------------------------------- // Check permissions... //-------------------------------------- if ( $std->check_perms($data['read_perms']) != TRUE ) { continue; } // Do the news stuff first if (isset($data['last_title']) and $data['last_id'] != "") { if ( ( $ibforums->vars['index_news_link'] == 1 ) and (! empty($ibforums->vars['news_forum_id']) ) and ($ibforums->vars['news_forum_id'] == $data['id']) ) { $this->news_topic_id = $data['last_id']; $this->news_forum_id = $data['id']; $this->news_title = $data['last_title']; } } if ($data['last_post'] > $newest['last_post']) { $newest['last_post'] = $data['last_post']; $newest['fid'] = $data['id']; //$newest['id'] = $data['id']; $newest['last_id'] = $data['last_id']; $newest['last_title'] = $data['last_title']; $newest['password'] = $data['password']; $newest['last_poster_id'] = $data['last_poster_id']; $newest['last_poster_name'] = $data['last_poster_name']; $newest['status'] = $data['status']; $newest['desktop'] = $data['desktop']; } $newest['posts'] += $data['posts']; $newest['topics'] += $data['topics']; $printed_children++; } if ( ($printed_children < 1) && ($can_see_root != TRUE) ) { // If we don't have permission to view any forums // and we can't post in this root forum // then simply return and the row won't be printed // return ""; } //------------------------------- ///------------------------------- // Get The Subforums //------------------------------- $querysub = $DB->query("SELECT name, id, read_perms FROM ibf_forums WHERE parent_id = '{$forum_data['id']}' ORDER BY ibf_forums.position"); if($DB->get_num_rows($querysub) > 0) { $subinfo = "<span class=desc><br>Subforums: "; while($subin = $DB->fetch_row($querysub)) { if ( $subin['read_perms'] != '*' ) { if ( ! preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $subin['read_perms'] ) ) { $subinfo .= ""; } else if ( preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $subin['read_perms'] ) ) { $subinfo .= "<a href='{$ibforums->base_url}showforum={$subin['id']}'>{$subin['name']}</a>, "; } } else if ( $subin['read_perms'] == '*' ) { $subinfo .= "<span class=desc><a href='index.php?showforum={$subin['id']}'>{$subin['name']}</a></span> - "; } } $subinfo = substr ($subinfo, 0, -2); } // Fix up the last of the data $newest['last_title'] = strip_tags($newest['last_title']); $newest['last_title'] = str_replace( "&#33;" , "!" , $newest['last_title'] ); $newest['last_title'] = str_replace( """, "\"", $newest['last_title'] ); if (strlen($newest['last_title']) > 30) { $newest['last_title'] = substr($newest['last_title'],0,27) . "..."; $newest['last_title'] = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...', $newest['last_title'] ); } if ($newest['password'] != "") { $newest['last_topic'] = $ibforums->lang['f_protected']; } else if($newest['last_title'] != "") { $newest['last_topic'] = "<a href='{$ibforums->base_url}showtopic={$newest['last_id']}&view=getnewpost' title='{$ibforums->lang['tt_gounread']}'>{$newest['last_title']}</a>"; } else { $newest['last_topic'] = $ibforums->lang['f_none']; } //NEWMAN // if ( isset($newest['last_poster_name'])) { if ( ($newest['desktop'] == 0) ) { $solid = ""; if ($newest['desktop']) { $solid2 = "<img src={$newest['desktop']}>"; } $newest['last_poster'] = $newest['last_poster_id'] ? "<a href='{$ibforums->base_url}showuser={$newest['last_poster_id']}'>{$newest['last_poster_name']}$solid2</a>" : $newest['last_poster_name']; } else { $newest['last_poster'] = $newest['last_poster_id'] ? "<a href='{$ibforums->base_url}showuser={$newest['last_poster_id']}'>{$newest['last_poster_name']}</a>" : $newest['last_poster_name']; } } else { $newest['last_poster'] = $ibforums->lang['f_none']; } $newest['img_new_post'] = $std->forum_new_posts($newest, $printed_children > 0 ? 1: 0); if ( $newest['img_new_post'] == '<{C_ON_CAT}>' ) { $newest['img_new_post'] = $this->html->subforum_img_with_link($newest['img_new_post'], $forum_data['id']); } $newest['last_post'] = $std->get_date($newest['last_post'], 'LONG'); $newest['posts'] = $std->do_number_format($newest['posts']); $newest['topics'] = $std->do_number_format($newest['topics']); foreach($newest as $k => $v) { if ($k == 'id') { continue; } $forum_data[$k] = $v; } $forum_data['moderator'] = $this->get_moderators($forum_id); return $this->html->ForumRow($forum_data, $subinfo); } else { return ""; } } else { //-------------------------------------- // Check permissions... //-------------------------------------- if ( $std->check_perms($forum_data['read_perms']) != TRUE ) { return ""; } //-------------------------------------- // Redirect only forum? //-------------------------------------- if ( $forum_data['redirect_on'] ) { // Simply return with the redirect information if ( $forum_data['redirect_loc'] != "" ) { $forum_data['redirect_target'] = " target='".$forum_data['redirect_loc']."' "; } $forum_data['redirect_hits'] = $std->do_number_format($forum_data['redirect_hits']); return $this->html->forum_redirect_row($forum_data); } //-------------------------------------- // No - normal forum.. //-------------------------------------- $forum_data['img_new_post'] = $std->forum_new_posts($forum_data); if ( $forum_data['img_new_post'] == '<{C_ON}>' ) { $forum_data['img_new_post'] = $this->html->forum_img_with_link($forum_data['img_new_post'], $forum_data['id']); } $forum_data['last_post'] = $std->get_date($forum_data['last_post'], 'LONG'); $forum_data['last_topic'] = $ibforums->lang['f_none']; if (isset($forum_data['last_title']) and $forum_data['last_id']) { if ( ( $ibforums->vars['index_news_link'] == 1 ) and (! empty($ibforums->vars['news_forum_id']) ) and ($ibforums->vars['news_forum_id'] == $forum_data['id']) ) { $this->news_topic_id = $forum_data['last_id']; $this->news_forum_id = $forum_data['id']; $this->news_title = $forum_data['last_title']; } $forum_data['last_title'] = strip_tags($forum_data['last_title']); $forum_data['last_title'] = str_replace( "&#33;" , "!", $forum_data['last_title'] ); $forum_data['last_title'] = str_replace( """, "\"", $forum_data['last_title'] ); if (strlen($forum_data['last_title']) > 30) { $forum_data['last_title'] = substr($forum_data['last_title'],0,27) . "..."; $forum_data['last_title'] = preg_replace( "/&(#(\d+;?)?)?\.\.\.$/", '...', $forum_data['last_title'] ); } else { $forum_data['last_title'] = preg_replace( "/&(#(\d+?)?)?$/", '', $forum_data['last_title'] ); } if ($forum_data['password'] != "") { $forum_data['last_topic'] = $ibforums->lang['f_protected']; } else { $forum_data['last_topic'] = "<a href='{$ibforums->base_url}showtopic={$forum_data['last_id']}&view=getnewpost' title='{$ibforums->lang['tt_gounread']}'>{$forum_data['last_title']}</a>"; } } if ( isset($forum_data['last_poster_name'])) { if ( ($forum_data['desktop'] == 0) ) { $solid = ""; if ($forum_data['desktop']) { $solid = "<img src={$forum_data['desktop']}>"; } $forum_data['last_poster'] = $forum_data['last_poster_id'] ? "<a href='{$ibforums->base_url}showuser={$forum_data['last_poster_id']}'>{$forum_data['last_poster_name']}$solid</a>" : $forum_data['last_poster_name']; } else { $forum_data['last_poster'] = $forum_data['last_poster_id'] ? "<a href='{$ibforums->base_url}showuser={$forum_data['last_poster_id']}'>{$forum_data['last_poster_name']}</a>" : $forum_data['last_poster_name']; } } else { $forum_data['last_poster'] = $ibforums->lang['f_none']; } //--------------------------------- // Moderators //--------------------------------- $forum_data['moderator'] = $this->get_moderators($forum_data['id']); $forum_data['posts'] = $std->do_number_format($forum_data['posts']); $forum_data['topics'] = $std->do_number_format($forum_data['topics']); $forum_data['description'] = str_replace( "<br>", "<br />", $forum_data['description'] ); return $this->html->ForumRow($forum_data, $newest, $subinfo); return $this->html->ForumRow($forum_data); } } Then u see at the bottom it does: return $this->html->ForumRow($forum_data); The htmll->Forumrow is the code I gave u above. (2more posts above). Hope u can help me sir..
  20. I changed it , now i have.: return <<<EOF <tr class="$color"> <td>$image_icon</td> <td align="left"><b><a href="index.php?showforum={$info['id']}" title="{$info['description']}">{$info['name']}</b></a>{$subinfo} {$info['moderator']}</td> <td nowrap><span class="desc">Topics:</span> {$info['topics']}<br/><span class="desc">Posts:</span> {$info['posts']}</td> <td align="left" nowrap class="lc"><span class="desc">{$info['last_post']}</span><br/>» {$info['last_topic']}<br>By {$info['last_poster']}</td> </tr> <tr> EOF; } and the tr just shows up as one color... i need to find the php code and loop it in there or something.. because <tr class="$color"> and $color should atlernate ce, ce bc1, ce, ce bc1 but it's not wtf.. lol Please dont give up on me guys, im willing to give you guys much help as possible but it be nice if u had a microphone so we can talk..
  21. OMG Thank u so much for replying finally.. Now do u need the skin_boards.php? or boards.php? file i can send both but here is the output of skin_boards.php this is were i need to change the altnerating tr class... : function ForumRow($info, $subinfo="") { global $ibforums; $color_one = 'ce bc1'; $color_two = 'ce'; $array = array('apple','pine','strawberry', 'pear','banana', 'cranberry','kiwifruit'); $i = 1; foreach($array as $value) { /* Check if ($i / 2) is an integer and determine which color to show. We will divide the number by 2 */ $color = (is_int($i / 2)) ? $color_one : $color_two; $i++; // Increment $i } return <<<EOF $color <tr class="ce"> <td>$image_icon</td> <td align="left"><b><a href="index.php?showforum={$info['id']}" title="{$info['description']}">{$info['name']}</b></a>{$subinfo} {$info['moderator']}</td> <td nowrap><span class="desc">Topics:</span> {$info['topics']}<br/><span class="desc">Posts:</span> {$info['posts']}</td> <td align="left" nowrap class="lc"><span class="desc">{$info['last_post']}</span><br/>» {$info['last_topic']}<br>By {$info['last_poster']}</td> </tr> <tr> EOF; } Those color_one is all my testing and trying to get it to work sorry.
  22. Ok I use ipb 1.3 I know im a noob for using it but I desperately need your help!! I am trying to alternate row colors on forum row.. Ok here's and example of What i want. I use the exact same style on my Forum too: NOw This is what my forum looks like [hence i changed color but i still need alternating row colors] Now i dont know if I should edit my skin files or .php directly files because I need to find the loop or something omg im so confused.. IF you have a microphone or msn please tell me it with a pm so we can talk i desperately need this and could you please please help me.. thanks!! and this is the <tr class="ce"> i need to alternate.. so it goes <tr class="ce bc1"> then <tr class="ce"> then <tr class="ce bc1"> and ya just keep's doing that for each forum row so it's alternating.. omg please help me im french but i am willing to learn
  23. u ok man ? lol
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.