Hallo,
Ik zoek iemand die even in mijn script kan toevoegen dat als ik
doe dat ik zo'n venster krijg.
Ik krijg het niet voor melkaar
- Roel CCode:<?php class ubb { var $code = array(); var $smiley = array( "<:-P" => 'Angry-Tongue.png', "<:P" => 'Angry-Tongue.png', "<:-(" => 'Angry.png', "<:(" => 'Angry.png', ":-]" => 'Blushing.png', ":]" => 'Blushing.png', ":-?" => 'Confused.png', ":?" => 'Confused.png', "B-)" => 'Cool.png', "B)" => 'Cool.png', "8-)" => 'Cool.png', "8)" => 'Cool.png', ":'(" => 'Crying.png', ":'-(" => 'Crying.png', ":-[" => 'Embarrassed.png', ":[" => 'Embarrassed.png', "<:-D" => 'Evil.png', "<:D" => 'Evil.png', ":-(" => 'Frown.png', ":(" => 'Frown.png', ":-O" => 'Gasp.png', ":O" => 'Gasp.png', "X-(" => 'Grimmace.png', "X(" => 'Grimmace.png', ":-D" => 'Grin.png', ":D" => 'Grin.png', ";-D" => 'Grinning-Wink.png', ";D" => 'Grinning-Wink.png', "O:-)" => 'Innocent.png', "0:)" => 'Innocent.png', ":-*" => 'Kiss.png', ":*" => 'Kiss.png', ":-X" => 'Lips-Are-Sealed.png', ":X" => 'Lips-Are-Sealed.png', "<:-)" => 'Mischievous.png', "<:)" => 'Mischievous.png', ':-$' => 'Money-Mouth.png', ':$' => 'Money-Mouth.png', "<:-|" => 'Not-Amused.png', "<:|" => 'Not-Amused.png', ":-!" => 'Oops.png', ":!" => 'Oops.png', ":-@" => 'Shouting.png', ":@" => 'Shouting.png', "|-)" => 'Sleeping.png', "I-)" => 'Sleeping.png', ":-)" => 'Smile.png', ":)" => 'Smile.png', ":-<" => 'Smirk.png', ":<" => 'Smirk.png', ":-|" => 'Straight-Faced.png', ":|" => 'Straight-Faced.png', ":-I" => 'Straight-Faced.png', ":I" => 'Straight-Faced.png', ":-P" => 'Tongue.png', ":P" => 'Tongue.png', ":-\\" => 'Undecided.png', ":\\" => 'Undecided.png', ";-P" => 'Wink-Tongue.png', ";P" => 'Wink-Tongue.png', ";-)" => 'Wink.png', ";)" => 'Wink.png' ); // standard smileys var $text = ''; var $size = 300; // standard thumbnail size (px) function ubb($size = null, $smileys = null){ if(is_array($smileys)) $this->smiley = $smileys; if(is_numeric($size)) $this->size = $size; } function ubb_ignore($string = '', $return = false){ if(!empty($string)) $this->setText($string); $this->text = preg_replace('#\[ignore\](.*?)\[/ignore\]#sie',"\$this->_ignore('\\1')",$this->text); if($return) return $this->getText(); } function ubb_code($string = '', $return = false){ if(!empty($string)) $this->setText($string); $this->text = preg_replace('#\[code\](.*?)\[/code\]#sie',"\$this->_highlight('\\1')",$this->text); $this->text = preg_replace('#\[code=(.+?)\](.*?)\[/code\]#sie',"\$this->_highlight('\\2','\\1')",$this->text); $this->text = preg_replace('#<\?(.*?)\?>#sie',"\$this->_highlight('<?\\1?>')",$this->text); if($return) return $this->getText(); } function ubb_html($string = '', $return = false){ if(!empty($string)) $this->setText($string); // HTML codes wegwerken $this->text = htmlspecialchars($this->text); // newlines maken $this->text = nl2br($this->text); if($return) return $this->getText(); } function ubb_opmaak($string = '', $return = false){ if(!empty($string)) $this->setText($string); // Cursief $this->text = preg_replace('#\[i\](.+?)\[/i\]#si','<span style="font-style: italic;">\\1</span>',$this->text); // Onderstreept $this->text = preg_replace('#\[u\](.+?)\[/u\]#si','<span style="text-decoration: underline;">\\1</span>',$this->text); // Vetgedrukt $this->text = preg_replace('#\[b\](.+?)\[/b\]#si','<span style="font-weight: bold;">\\1</span>',$this->text); // Doorstreept $this->text = preg_replace('#\[s\](.+?)\[/s\]#si','<span style="text-decoration: line-through;">\\1</span>',$this->text); // Kleur $this->text = preg_replace('#\[color=(.+?)\](.+?)\[/color\]#si','<span style="color: \\1;">\\2</span>',$this->text); // Grootte $this->text = preg_replace('#\[size=([1-9]{1})\](.+?)\[/size\]#si','<span style="font-size: \\1ex;">\\2</span>',$this->text); $this->text = preg_replace('#\[size=([a-z\-]{5,8})\](.+?)\[/size\]#si','<span style="font-size: \\1;">\\2</span>',$this->text); // Uitlijning $this->text = preg_replace('#\[align=([a-z]{4,7})\](.+?)\[/align\]#si','<div style="text-align: \\1;">\\2</div>',$this->text); if($return) return $this->getText(); } function ubb_url($string = '', $return = false){ if(!empty($string)) $this->setText($string); // Links maken met behulp van tags $this->text = preg_replace('#\[url\]((([a-z0-9]{1,6}:[/]{2}|\#|\?)|([a-z0-9]{1,6}:))(.+?))\[/url\]#si','<a href="\\1">\\3\\5</a>',$this->text); $this->text = preg_replace('#\[url\](.+?)\[/url\]#si','<a href="http://\\1">\\1</a>',$this->text); // Links maken met titel $this->text = preg_replace('#\[url=([a-z0-9]{1,6}:(.+?))\](.+?)\[/url\]#si','<a href="\\1">\\3</a>',$this->text); $this->text = preg_replace('#\[url=(.+?)\](.+?)\[/url\]#si','<a href="http://\\1">\\2</a>',$this->text); // Mailto links $this->text = preg_replace('#\[mail\](.+?)\[/mail\]#si','<a href="mailto:\\1">\\1</a>',$this->text); // Skype links $this->text = preg_replace('#\[skype\](.+?)\[/skype\]#si','<a href="callto:\\1">\\1</a>',$this->text); if($return) return $this->getText(); } function ubb_autourl($string = '', $return = false){ if(!empty($string)) $this->setText($string); // Automatisch links maken $this->text = preg_replace('#(^|[ \n\r\t])([a-z0-9]{1,6}://([a-z0-9\-]{1,}(\.?)){1,}[a-z]{2,5}(:[0-9]{2,5}){0,1}((\/|~|\#|\?|=|&|&|\+){1}[a-z0-9\-._%]{0,}){0,})#si', '\\1<a href="\\2">\\2</a>',$this->text); $this->text = preg_replace('#(^|[ \n\r\t])((www\.){1}([a-z0-9\-]{1,}(\.?)){1,}[a-z]{2,5}(:[0-9]{2,5}){0,1}((\/|~|\#|\?|=|&|&|\+){1}[a-z0-9\-._%]{0,}){0,})#si', '\\1<a href="http://\\2">\\2</a>',$this->text); $this->text = preg_replace('#(^|[ \n\r\t])(([a-z0-9\-_]{1,}(\.?)){1,}@([a-z0-9\-]{1,}(\.?)){1,}[a-z]{2,5})#si', '\\1<a href="mailto:\\2">\\2</a>',$this->text); if($return) return $this->getText(); } function ubb_img($string = '', $return = false){ if(!empty($string)) $this->setText($string); // Plaatjes $this->text = preg_replace('#\[img\](.+?)\[/img\]#si','<a href="\\1" rel="lightbox"><img src="'.INCLUDES.'image.php?file=[img]\\1[/img]&size='.$this->size.'" alt="Afbeelding"/></a>',$this->text); $this->text = preg_replace('#\[img=(.+?)\](.+?)\[/img\]#si','<a href="\\2" rel="lightbox" title="\\1"><img src="'.INCLUDES.'image.php?file=[img]\\2[/img]&size='.$this->size.'" alt="\\1"/></a>',$this->text); $this->text = preg_replace('#\[img\](.+?)\[/img\]#sie','urlencode("\\1")',$this->text); if($return) return $this->getText(); } function ubb_smiley($string = '', $return = false){ if(!empty($string)) $this->setText($string); // Smileys foreach ($this->smiley as $key => $img) { $this->text = str_replace(' '.$key,' <img src="'.INCLUDES.'images/smilies/'.$img.'" alt="'.$key.'"/>',$this->text); $this->text = str_replace($key.' ','<img src="'.INCLUDES.'images/smilies/'.$img.'" alt="'.$key.'"/> ',$this->text); // $this->text = preg_replace('#(^|[ \n\r\t]?)('.quotemeta($key).')(^|[ \n\r\t]?)#is','\\1<img src="'.INCLUDES.'images/smilies/'.$img.'" alt="'.$key.'" />\\3',$this->text); // commented because it gives a max execution time limit error ... } if($return) return $this->getText(); } function ubb_quote($string = '', $return = false){ if(!empty($string)) $this->setText($string); // reactie $this->text = preg_replace('#\[reactie\](<br />)(.+?)\[/reactie\]#si','<div class="Block"><div class="Reactie">\\2</div></div>',$this->text); $this->text = preg_replace('#\[reactie\]()(.+?)\[/reactie\]#si','<div class="Block"><div class="Reactie">\\2</div></div>',$this->text); // edit $this->text = preg_replace('#\[edit\](<br />)(.+?)\[/edit\]#si','<div class="Block"><div class="Edit"><b>edit</b>:<br>\\2</div></div>',$this->text); $this->text = preg_replace('#\[edit\]()(.+?)\[/edit\]#si','<div class="Block"><div class="Edit"><b>edit</b>:<br>\\2</div></div>',$this->text); // quote $this->text = preg_replace('#\[quote\](<br />)(.+?)\[/quote\]#si','<div class="Block"><div class="Quote">\\2</div></div>',$this->text); $this->text = preg_replace('#\[quote\]()(.+?)\[/quote\]#si','<div class="Block"><div class="Quote">\\2</div></div>',$this->text); if($return) return $this->getText(); } function ubb_list($string = '', $return = false){ if(!empty($string)) $this->setText($string); // make an ordered or un-ordered list $this->text = preg_replace('#\[ul\](<br />){0,}(.+?)\[/ul\](<br />){0,}#si','<ul>\\2</ul>',$this->text); $this->text = preg_replace('#\[ol\](<br />){0,}(.+?)\[/ol\]#si','<ol>\\2</ol>',$this->text); $this->text = preg_replace('#\[li\](.+?)\[/li\](<br />){0,}#si','<li>\\1</li>',$this->text); if($return) return $this->getText(); } function ubb_search($string = '', $return = false){ if(!empty($string)) $this->setText($string); // search words (word1+word2) $search = array(); $this->text = preg_replace('#\[search=((([a-z_0-9]{1,})(\+?)){1,})\](.+?)\[/search\]#sie','$this->_search("\\1","\\5")',$this->text); if($return) return $this->getText(); } function ubb_spoil($string = '', $return = false){ if(!empty($string)) $this->setText($string); // spoiler $this->text = preg_replace('#\[spoiler=(.+?)\](.+?)\[/spoiler\]#sie',"'<input type=\"button\" value=\"\\1\" onclick=\"javascript:ShowHide(\'spoil_'.md5('\\1').'\');\" /><div class=\"Block\"><div id=\"spoil_'.md5('\\1').'\" class=\"Spoiler\">'.stripslashes('\\2').'</div></div>'",$this->text); if($return) return $this->getText(); } function parse($string = '', $tags = array()){ if(!empty($string)) $this->setText($string); foreach ($tags as $tag){ if(method_exists($this, 'ubb_'.$tag)) eval('$this->ubb_'.$tag.'();'); } return $this->getText(); } function parse_all($string = ''){ if(!empty($string)) $this->setText($string); $methods = get_class_methods($this); foreach ($methods as $method){ $sub = explode('_',$method); if($sub[0] == 'ubb' and count($sub) > 1) eval('$this->'.$method.'();'); } return $this->getText(); } function setText($string){ $this->text = $string; $this->code = array(); } function getText(){ $this->text = preg_replace('#\[highlight\]([0-9])\[/highlight\]#sie','$this->_highlight(\\1)',$this->text); $this->text = preg_replace('#\[highlight=(.+?)\]([0-9])\[/highlight\]#sie','$this->_highlight(\\2,"\\1")',$this->text); $this->text = preg_replace('#\[ignore\]([0-9])\[/ignore\]#sie','$this->_ignore(\\1)',$this->text); return $this->text; } function _highlight($code, $file = false){ if(is_numeric($code)){ $highlight = '<div class="Block"><small>Code'; if($file) $highlight .= ': <b>'.$file.'</b>'; $highlight .= '</small><div class="Code"><div class="CodeLines">'; $n = 0; $lines = explode("\n",$this->code[$code]); $code = highlight_string($this->code[$code], true); $code = str_replace(array('<font ', '</font>', '<code>', '</code>'), array('<span ', '</span>', '', ''), $code); $code = preg_replace('#color="(.*?)"#', 'style="color: \\1;"', $code); while ($n < count($lines)) $highlight .= ++$n.'<br />'; $highlight .= '</div><div class="CodeCode">'. substr($code,30,-8) .'</div></div></div>'; return $highlight; }else{ $n = array_push($this->code,trim(str_replace("\\\"", "\"", $code))); if($file) return '[highlight='.$file.']'.--$n.'[/highlight]'; else return ''.--$n.''; } } function _ignore($code){ if(is_numeric($code)){ return $this->code[$code]; }else{ $n = array_push($this->code,nl2br(htmlspecialchars($code))); return '[ignore]'.--$n.'[/ignore]'; } } function _search($search,$text){ $search = explode('+',$search); foreach ($search as $word){ $color = '#'; for ($i = 0; $i < 3; $i++ ) $color .= str_pad(dechex(( round(rand(0,255)/51) * 51 )), 2, '0', STR_PAD_LEFT); $text = preg_replace('#(^|[ \n\r\t])(' . trim($word) . ')(^|[ \n\r\t\,\.\;\:])#si', '\\1<span style="background-color: '.$color.';">\\2</span>\\3', $text); } return $text; } } ?>
- Script probleempje
-
31-10-2007, 18:35 #1
- Berichten
- 2.202
- Lid sinds
- 19 Jaar
Script probleempje
-
In de schijnwerper
Senior Designster - top kwaliteit - 16 uur per week - per maand - 350 euroFreelance / WerkHandmatig linkbuilden aangeboden (vanaf 7,50 per link)Freelance / WerkVergelijk website|nu al inkomsten|bezoekers|1 maand onlineWebsite te koopPrijsperkwh.nl - met content & affiliate kansenWebsite te koop -
31-10-2007, 22:04 #2
- Berichten
- 68
- Lid sinds
- 18 Jaar
Dat je wat voor venter krijgt als je wat doet?
-
31-10-2007, 22:14 #3
- Berichten
- 2.202
- Lid sinds
- 19 Jaar
[ code] [/code ]
aan elkaar
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic