Jump to content

drisate

Members
  • Posts

    805
  • Joined

  • Last visited

Everything posted by drisate

  1. Hey guys! I am in the process of creating a PHP webmail using IMAP. I have almost everything finished ... but theres one feature i can't figure out ... How can i move an email to a specefique folder if the subject is equal or contains a specifique string? Are those rules controled by IMAP or is that somthing i need to save to MySQL and loop and move on message listing? ...
  2. Hey guys. Just wandering if anybody with IMAP experience can explain me how to manage the email character encryption when the email uses letters that are not taken in charge by the current page header. In my case UTF-8
  3. Use CSS to filtrer out what to print and what not to print
  4. drisate

    Object

    How can i get the bank-account value from this class object ... Print_r= jparameter Object ( [_raw] => menutype=bank-account menu_style=list startLevel=0 endLevel=0 showAllChildren=0 window_open= show_whitespace=0 cache=1 tag_id= class_sfx= moduleclass_sfx= maxdepth=10 menu_images=0 menu_images_align=0 menu_images_link=0 expand_menu=0 activate_parent=0 full_active_id=0 indent_image=0 indent_image1= indent_image2= indent_image3= indent_image4= indent_image5= indent_image6= spacer= end_spacer= [_xml] => [_elements] => Array ( ) [_elementPath] => Array ( [0] => /home/betable/public_html/libraries/joomla/html/parameter/element ) [_errors] => Array ( ) [_defaultNameSpace] => _default [_registry] => Array ( [_default] => Array ( [data] => stdClass Object ( [menutype] => bank-account [menu_style] => list [startLevel] => 0 [endLevel] => 0 [showAllChildren] => 0 [window_open] => [show_whitespace] => 0 [cache] => 1 [tag_id] => [class_sfx] => [moduleclass_sfx] => [maxdepth] => 10 [menu_images] => 0 [menu_images_align] => 0 [menu_images_link] => 0 [expand_menu] => 0 [activate_parent] => 0 [full_active_id] => 0 [indent_image] => 0 [indent_image1] => indent1.png [indent_image2] => indent2.png [indent_image3] => indent3.png [indent_image4] => indent4.png [indent_image5] => indent5.png [indent_image6] => indent.png [spacer] => [end_spacer] => ) ) ) )
  5. This is an exemple of the output
  6. Bump i really need help on this ... is there any charset_decode() thing out there?
  7. Hey guys, i trying to build a webmail and i am having problems when i receive an email in a foreign charset .... What do i do to make every characters show like they should with out changing the webmail header charset?
  8. Yeah sorry i am using a weird browser at the moment and i messed the scroller of the code box lol Can you take a look in your database and confirm the title of the $row['id'] is not empty and show us what it contains and can you take a look at the HTML output code ... sometimes some values can temper with the output since your not filtring it ... Ex: $this = '"hi'; echo "<input type = "hidden" name = "id" value ="'.$this.'">"; Would end up being: <input type = "hidden" name = "id" value =""hi"> So what's in that table?
  9. I did not test your stuff but could it be a quote problem ... Your not filtring out the stuff befor inserting it. Does mysql_error() return anything I dont understand your question actualy. What do you mean you dont see the title in the edit page <input type="text" name = "title" size="32"> If you mean in that box it would probably work better if you insert the value
  10. Hey guys i am building a webmail and i am having a very hard time with foreign email using a different charset ... i was wandering how can i detect the charset used and make a specific <div> use that encoding with out tempering with the normal webmail charset ... -> Driving me nuts! <-
  11. found it if ($items[stat_value1]!="0"){$desc=$desc.$st[$items[stat_type1]].": $items[stat_value1]<br>";} if ($items[stat_value2]!="0"){$desc=$desc.$st[$items[stat_type2]].": $items[stat_value2]<br>";} if ($items[stat_value3]!="0"){$desc=$desc.$st[$items[stat_type3]].": $items[stat_value3]<br>";} if ($items[stat_value4]!="0"){$desc=$desc.$st[$items[stat_type4]].": $items[stat_value4]<br>";} if ($items[stat_value5]!="0"){$desc=$desc.$st[$items[stat_type5]].": $items[stat_value5]<br>";} if ($items[stat_value6]!="0"){$desc=$desc.$st[$items[stat_type6]].": $items[stat_value6]<br>";} if ($items[stat_value7]!="0"){$desc=$desc.$st[$items[stat_type7]].": $items[stat_value7]<br>";} if ($items[stat_value8]!="0"){$desc=$desc.$st[$items[stat_type8]].": $items[stat_value8]<br>";} if ($items[stat_value9]!="0"){$desc=$desc.$st[$items[stat_type9]].": $items[stat_value9]<br>";}
  12. Hey guys i am trying to do this $st['3']="Agility"; $st['4']="Strength"; $st['5']="Intellect"; $st['6']="Spirit"; $st['7']="Stamina"; $st['12']="Defense"; $st['13']="Dodge"; $st['14']="Parry"; $st['15']="Block"; $st['35']="Resilience"; $st['31']="Hit Rating"; $st['33']="Hit Avoidance"; $st['32']="Hit Crit Rating"; $st['34']="Hit Crit Avoidance"; $st['36']="Hit Haste Rating"; $st['16']="Melee Hit Rating"; $st['19']="Melee Crit Rating"; $st['22']="Melee Hit Avoidance"; $st['25']="Melee Crit Avoidance"; $st['28']="Melee Haste Rating"; $st['17']="Ranged Hit Rating"; $st['20']="Ranged Crit Rating"; $st['23']="Ranged Hit Avoidance"; $st['26']="Ranged Crit Avoidance"; $st['29']="Ranged Haste Rating"; $st['18']="Spell Hit Rating"; $st['21']="Spell Crit Rating"; $st['24']="Spell Hit Avoidance"; $st['27']="Spell Crit Avoidance"; $st['30']="Spell Haste Rating"; if ($items[stat_value1]!="0"){$desc=$desc.$st[".$items[stat_type1]."].": $items[stat_value1]<br>";} if ($items[stat_value2]!="0"){$desc=$desc.$st[".$items[stat_type2]."].": $items[stat_value2]<br>";} if ($items[stat_value3]!="0"){$desc=$desc.$st[".$items[stat_type3]."].": $items[stat_value3]<br>";} if ($items[stat_value4]!="0"){$desc=$desc.$st[".$items[stat_type4]."].": $items[stat_value4]<br>";} if ($items[stat_value5]!="0"){$desc=$desc.$st[".$items[stat_type5]."].": $items[stat_value5]<br>";} if ($items[stat_value6]!="0"){$desc=$desc.$st[".$items[stat_type6]."].": $items[stat_value6]<br>";} if ($items[stat_value7]!="0"){$desc=$desc.$st[".$items[stat_type7]."].": $items[stat_value7]<br>";} if ($items[stat_value8]!="0"){$desc=$desc.$st[".$items[stat_type8]."].": $items[stat_value8]<br>";} if ($items[stat_value9]!="0"){$desc=$desc.$st[".$items[stat_type9]."].": $items[stat_value9]<br>";} if ($items[stat_value10]!="0"){$desc=$desc.$st[".$items[stat_type10]."].": $items[stat_value10]<br>";} But when stat_value is not equal to 0 or nothing $st[".$items[stat_type10]."]. returns nothing When i echo $desc i get : 14<br> instead of Strength: 14<br> is something wrong with $st[".$items[stat_type10]."]?
  13. worked great bro thx a lot. This will be really useful stuff to know
  14. I tryed preg_match_all($regex,$sb_message_txt,$match); $picinfo = getimagesize($match[2]); $picinfo[0] = ($picinfo[0] > 460)? 460 : $picinfo[0]; $replacement = '<img src="'.$match[2].'" width="'.$picinfo[0].'" border="0" alt="" />'; $sb_message_txt=preg_match_all($regex, $replacement, $sb_message_txt); But getimagesize returns an error because $match[2] is null
  15. hey guys. I am trying to replace the size of every images posted to max it at 460px but the script works only for the first image. All the others use the same value so if theres 6 images in the poste it will be 6 time the same image. $regex = '/(<img.*?src="(.*?)".*?>)/'; preg_match($regex,$sb_message_txt,$match); $picinfo = getimagesize($match[2]); $picinfo[0] = ($picinfo[0] > 460)? 460 : $picinfo[0]; $replacement = '<img src="'.$match[2].'" width="'.$picinfo[0].'" border="0" alt="" />'; $sb_message_txt=preg_replace($regex, $replacement, $sb_message_txt);
  16. in a very desprate attempt i tryed $regex = '/(<img.*?src="(.*?)".*?>)/'; preg_match($regex,$sb_message_txt,$match); foreach($regex as $regexs){ $picinfo = getimagesize($match[2]); $picinfo[0] = ($picinfo[0] > 430)? 430 : $picinfo[0]; $replacement = 'img src="'.$match[2].'" width="'.$picinfo[0].'" border="0" alt="" /'; $sb_message_txt=preg_replace($regexs, $replacement, $sb_message_txt); } LOL Obviously not working hahaha
  17. hmm it works but for some reason every images of the messages are replaces by the value of the first image img src="http:// img201.imageshack.us /img201/5206/ skellgriffot8.png" width="430" border="0" alt="" / img src="http:// img201.imageshack.us /img201/5206/ skellgriffot8.png" width="430" border="0" alt="" / img src="http:// img201.imageshack.us /img201/5206/ skellgriffot8.png" width="430" border="0" alt="" / img src="http:// img201.imageshack.us /img201/5206/ skellgriffot8.png" width="430" border="0" alt="" /
  18. Hi guys ia m having a hard time making this script work $sb_message_txt = $fmessage->message; $sb_message_txt = stripslashes(smile::smileReplace($sb_message_txt,0, $sbConfig['disemoticons'])); $sb_message_txt = str_replace("\n","<br />",$sb_message_txt); preg_match('/(<img.*?src="(.*?)".*?>)/',$sb_message_txt,$match); $picinfo = getimagesize($match[2]); $picinfo[0] = ($picinfo[0] > 430)? 430 : $picinfo[0]; $replacement = 'img src="'.$match[2].'" width="'.$picinfo[0].'" border="0" alt="" /'; $sb_message_txt = preg_replace($match[1], $replacement, $sb_message_txt); I am trying to resize every images bigger then 430 px but i get this error Warning: preg_replace() [function.preg-replace]: Empty regular expression in view.php on line 439 Line 439 is $sb_message_txt = preg_replace($match[1], $replacement, $sb_message_txt);
  19. hey guys i need a code that finds every images inside a posted message and that checks if the size is bigger then 430 px if it is put 430. I guess we would need to search for a paterne then extract the info and replace if needed ... There can be only 2 paternes 1. $message='blablablabla <img src="http://..." border"0" alt="" />blablablabla blablablabla'; and 2. $message='blablablabla <img src="http://..." border"0" alt="" width="">blablablabla blablablabla'; For paterne 1 we need to get the image size from the image it self using the image adress then add a width inside the string. For paterne 2 we need to check the width and change the value if needed I have abselutly no idea how to do that ...
  20. Hey guys. I am currently using an old version of the joomlaboard made out a very very old version of the simple machine forum. That board currently has a very basic bbcode feature. One thing that annoys me allot is that members can use the tag but when it's larger then 430px it breaks the webpage layout. What i would like to do is find a way to detect the size and max it at 430 This is what the code looks like: messageString = messageString.replace(/\[img size=([1-4][0-9][0-9])\](.*?)\[\/img\]/g,"<img src=\"$2\" border\"0\" alt=\"\" width=\"$1"\">"); messageString = messageString.replace(/\[img\](.*?)\[\/img\]/g,"<img src=\"$1\" border\"0\" alt=\"\" />"); I can do this in PHP but Javascript is beyond my comprehension ... From what i understand the first one use $1 as the size value so if ($1>'"430") $i="430" How can i put that in there? In the second part, we don't have the size value but the image source. So we need to extract the width of the image and if it's bigger than 430 restrict it to 430. But again, how to do i do that in javascript? the full code look like this: messageString = messageString.replace(/\[img size=([1-4][0-9][0-9])\](.*?)\[\/img\]/g,"<img src=\"$2\" border\"0\" alt=\"\" width=\"$1"\">"); messageString = messageString.replace(/\[img\](.*?)\[\/img\]/g,"<img src=\"$1\" border\"0\" alt=\"\" />"); messageString = messageString.replace(/(\[url\])(.*?)(\[\/url\])/g,"<a href=$2 target=\"_blank\">$2</a>"); messageString = messageString.replace(/\[url=(.*?)\](.*?)\[\/url\]/g,"<a href=\"$1\" target=\"_blank\">$2</a>"); messageString = messageString.replace(/\[size=([1-7])\](.+?)\[\/size\]/g,"<font size=\"$1\">$2</font>"); messageString = messageString.replace(/\[color=(.*?)\](.*?)\[\/color\]/g,"<span style=\"color: $1\">$2</span>"); messageString = messageString.replace(/\[file name=(.*?) size=(.*?)\](.*?)\[\/file\]/g,"<div class=\"sb_file_attachment\"><span class=\"contentheading\">File Attachment:</span><br>File name: <a href=\"$3\">$1</a><br>File size:$2 bytes</div>");
  21. Your a genious genericnumber1 (sarcastic) lol My question was "Can you guys help me rephrase the code above?" I new it was a compatibility issue hehe
  22. Hey guys ... i think i am facing a PHP compatibility issue with an open source script. My server is on PHP4 and this script $result = mysql_query("SELECT * FROM languages WHERE id = ".ucfirst($langdetect)) or die('Query failed get seasons: ' . mysql_error()); $detectedlang = mysql_fetch_object($result)->name; $result = mysql_query("SELECT * FROM languages WHERE id = $langid") or die('Query failed get seasons: ' . mysql_error()); $enteredlang = mysql_fetch_object($result)->name; $errormessage .= "You attempted to enter an $detectedlang overview into the $enteredlang overview field. Please pick the correct language and try again. If the language detected is wrong please come to the forums and let us know.<br/>"; is returning Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/betable/public_html/tv/index.php on line 284 Can you guys help me rephrase the code above?
  23. Hey guys. I have a database with rows that contains a date in this format 2008-11-04 12:53:18 I need to select every rows where the date is latter then 30 days. What would be the SQL querry?
×
×
  • 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.