Jump to content
xisto Community

dungsport

Members
  • Content Count

    86
  • Joined

  • Last visited

Everything posted by dungsport

  1. The thing is you have to upload all files of your website onto public_html folder on the server. I think it would be hard to use the File Management feature in cpanel to upload them.You should use an FTP Client tool like SmartFTP (at https://www.smartftp.com/). SmartFTP works like Windows Explorer which you can drag and drop your file onto an FTP folder.You need to install SmartFTP then run it. In the SmartFTP window, enter your website address (yourname.astahost.com) and Login name and password then press Enter (leave the port as 21).It will show you the login process followed by folder tree in the left panel. All you have to do in click on the folder public_html to open it (it works just like Windows Explorer). Then open Windows Explorer and go to the folder that you saved all web pages files. Select all files/folders then drag and drop them into the right panel of SmartFTP window.You will be seeing uploading status in the SmartFTP window.When it finishes, test it with your web site address in Internet Explorer or something.Enjoy
  2. Create a pdf on the fly, I am sure that many people know how to do it but not attaching those into email. You can have a lot tutorials about generating a pdf on the fly without storing anything on webserver. This technique allow you to customise the pdf as client's requirements. Let's say you have a huge database of various types of books. On your website, visitors have the option to download sample booklet (in pdf format) of a book for which they are looking. In the old days, you have to create all of those pdf files manually or whatever way you can then upload them onto web server. Links to those pdf files have to be set up in advance properly. If you add new books to your database, the same process of making sample booklet will be repeated. Today, that process can be done just in one php file which uses some libraries to generate pdf booklet on the fly as soon as a visitor asks for downloading it. I will show you this simple step in a moment. However, what could you do if you do want to send those booklet to your visitors through provided email address instead of downloading them. Should you give them a link to the file or attach them with that email? A link in an email is nothing easier but attachment. After showing you how to create a pdf file on the fly using FPDF class, I will demonstrate how to attach that pdf file into emails. PART I: Create PDF file on the fly To generate a PDF file using PHP, you need a tool that supports you to do so. In this tutorial, I use FPDF which is completely free and can be downloaded from http://www.fpdf.org/. Following are some highlight features: ° Choice of measure unit, page format and margins ° Page header and footer management ° Automatic page break ° Automatic line break and text justification ° Image support (JPEG and PNG) ° Colors ° Links ° TrueType, Type1 and encoding support ° Page compression You do not need to have any extra tool to get FPDF to work. However, if you choose to use compression feature, zlib is required. FPDF works just fine with PHP version 4 and 5. In this tutorial, the main purpose is how to send a pdf that you create on the fly as an email attachment. So, the following simple example on how to create a pdf file using PHP is borrowed from FPDF website. Visit FPDF website for full documentation and tutorials. <?php require('fpdf.php'); $pdf=new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World!'); $pdf->Output(); ?> The sample code above just returns a pdf file with the message "Hello World!" as usual. I will use the same code in the next part of this tutorial. Make sure you download the fpdf.php from FPDF website and place it in the same folder with the example file or using absolute/relative path to fpdf.php if it is in another folder. PART II: Sending pdf as email attachment You can send email using just native PHP code. However, to make this task simple, I prefer to use PEAR's Mail class which can be obtained from http://pear.php.net/. Do not forget to get a copy of PEAR's Mime class because PEAR's Mail need it to attach files into emails. Make sure you set up all those PEAR classes properly in order to get this to work. <?php require('fpdf/fpdf.php'); $pdf=new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World!'); $pdfcontent = $pdf->Output("helloworld.pdf", "S"); require_once('Mail.php'); require_once('Mail/mime.php'); // email address of the recipient $to = "youremail@yahoo.com"; // email address of the sender $from = "senderemail@yahoo.com"; // subject of the email $subject = "Hello world from coolersport"; // email header format complies the PEAR's Mail class // this header includes sender's email and subject $headers = array('From' => $from, 'Subject' => $subject); // We will send this email as HTML format // which is well presented and nicer than plain text // using the heredoc syntax // REMEMBER: there should not be any space after PDFMAIL keyword $htmlMessage = <<<PDFMAIL <html> <body bgcolor="#ffffff"> <p align="center"> Please find the pdf attached in the email.<br> This is generated by <b style="font-size:18pt;">FPDF</b> </p> </body> </html> PDFMAIL; // create a new instance of the Mail_Mime class $mime = new Mail_Mime(); // set HTML content $mime->setHtmlBody($htmlMessage); // IMPORTANT: add pdf content as attachment $mime->addAttachment($pdfcontent, 'application/pdf', 'helloworld.pdf', false, 'base64'); // build email message and save it in $body $body = $mime->get(); // build header $hdrs = $mime->headers($headers); // create Mail instance that will be used to send email later $mail = &Mail::factory('mail'); // Sending the email, according to the address in $to, // the email headers in $hdrs, // and the message body in $body. $mail->send($to, $hdrs, $body); ?> You can notice that this will send email using built-in PHP mail() function, so make sure your web server can send email. I reckon the localhost will not work in this case. Look at the line: // create Mail instance that will be used to send email later $mail = &Mail::factory('mail'); If you want to send email using SMTP or other method, please read instruction in PEAR documentation. As you can see, in the sample in part 1, the function output() is used without any parameter. As default, FPDF will return PDF code to http stream and will be display at client browser. In the example of part 2, output() function has two parameters. The first one is file name of that pdf file, which will be ignored because the second parameter "S" is used. Passing string "S" in the second parameter of the output() function will tell FPDF to return PDF file as a string instead of output it to client browser. As you can see, the result is stored in $pdfcontent and attached into the email later. The addAttachment() function will cast the $pdfcontent string into "base64" format which will produce correct format for the pdf file in email attachment. Conclusion I do not want to cover too much information in this tutorial except what has been discussed above. If you'd like to understand more about FPDF and PEAR's functions, please visit their website. I hope that this will give you a idea of what the tutorial title says and you can put this into work.
  3. Mine here: Site address: coolersport.info Theme: My personal site and some sharing stuff Active: YES Added - m^e
  4. These are what I found so far, hope it help mate http://forums.xisto.com/no_longer_exists/ http://forums.xisto.com/no_longer_exists/ http://forums.xisto.com/no_longer_exists/
  5. The dot * is the string concatenate operator in PHP. It just likes the ampesand (&) in Visual Basic, plus sign (+) in java/javascript.Any numeric data in the expression will be converted into string before it is joined together.
  6. hey dude, I reckon Intel is the better choice if you can afford for it. 2.5 GHz processor sounds all right but do not choose Celeron. 1 GB ram is more than enough for you, however, the more ram the better.You have missed two important factors is Video Card and Harddrive. The speed of your hard drive is vital, 5400rpm would be ok but 7200rpm is recommended. You should not choose integrated video card that shared you system memory and its memore should be about 64Mb or more.Then the question is: can you afford for it
  7. Ok, the idea is that you need to count the number of files (Backgrounds, Scripts, tutorials, templates...). Let's make it simple by placing each file type in different folders. Scripts files will go in /Scripts, Tutorials file will do in /Tutorials, and so on... Then using this code to count number of files in a particular folder, for instance, /Backgrounds. Remember the path could be absolute or relative. You have to work out the right path for each of them. <?php$numofbackgrounds = 0;if ($handle = opendir('/Scripts/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $numofbackgrounds++; } }}closedir($handle); ?> Using the same technique but diffrent path for Scripts, Tutorials and Templates: <?php$numofscripts = 0;if ($handle = opendir('/Scripts/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $numofscripts++; } }}closedir($handle); ?> <?php$numoftutorials = 0;if ($handle = opendir('/Tutorials/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $numoftutorials++; } }}closedir($handle); ?> <?php$numoftemplates = 0;if ($handle = opendir('/Templates/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $numoftemplates++; } }}closedir($handle); ?> So, finally, you can print out what you're after: <?phpecho "Background : $numofbackgrounds Scripts: $numofscripts Tutorials: $numoftutorials Templates: $numoftemplates Total: ".($numofbackgrounds+$numofscripts+$numoftutorials+$numoftemplates);?> Hope it helps, buddy
  8. Ok guys, the shout box has been improved a lot and ready for you to download as whole package. Please visit my portfolio at http://blog.coolersport.info/ and download this light-weight shoutbox. It is now more customisable and ready to use. Install with no hassle. Moreover, new features have been added into it like timezone adjustment, flooding control, bad words filter, toggle smiley panel and paging navigations. Check it out at http://blog.coolersport.info/. Your suggestions and ideas for this shoutbox as well as my website are really appreciated. Thanks
  9. Hihi, I'm one of the kinda people hate writing the most. I'll try to write something at home page so that people would have some ideas about it. Of course, it's a website of me. Thanks for your opinion.When I first started making a web site online, I thought I would help me keep things that I can access anytime, anywhere like website bookmarks, download links... Things have changed, haven't them?So, it looks like I have to make it seriously.Ah, I have changed the color theme, love it a little bit more than before, lol.Thanks again everyone
  10. I have adjusted some points as you guys suggested. Thanks. Still dont like the banner, will change if I have some ideas with that.
  11. wow, I really appreciate your words. The error is caused by tracking system. Im trying to fix it.That picture on top was in the old version. Many people told me that, im seeking for a replacement too.Thanks for coming everyone. It'd be a bit brighter, wouldn't it?
  12. Hi everyone, I have just upgraded my site at http://blog.coolersport.info/. I'm not going to review it and I'm not very happy with it. Hope people will give me some ideas to improve. My shoutbox is there for you to "shout". Thanks for coming
  13. Hi ninja, i found nothing wrong with your batch file. However, you should know that tasklist is not internal command. You must have tasklist.exe or .com or .bat or whatever executable extension. You can comment it out or delele that line if you're not so sure about it. You files shoud be like below and could run 99% ( it runs on my computer). --test.bat---------------- @echo off cls ver > info.txt ipconfig /all >> info.txt tasklist >> info.txt <-- delete this line if not sure about tasklist command pause ftp -s:commands.txt pause exit --commands.txt-------------- open ftp.ninja.astahost.com ninja <-- remove user, just put username here *my password* <-- your password here, remove this line if login as anonymous cd public_html put info.txt quit My advice is not to put your server at risk as allow anonymous user to update files. If you have any problem regarding this, feel free to put them here. Hey, dont forget attach error message or whatever screen message you got as the error happens. Cheers
  14. I dont know if Macromedia has a version of Macromedia Captivate running on Linux. This is a cutting edge tool that I've ever used. It's worth to have a look at it. Others are also available on Windows (I'm not sure if they supports Linux, google it and find out yourself) Camtasia Studio at https://www.techsmith.com/ Matchware ScreenCorder at https://www.matchware.com/ RiverPast Screen Recorder at http://forums.xisto.com/no_longer_exists/ Hey, wait, if you could not find any screen recorder on linux, here is the tip. Install VNC or similar service on your linux box Run VNC client on a Windows machine and connect to the one running Linux Install Macromedia Captivate or whatever software you'd like on Windows machine and start recording the VNC client screen Hope it helps you out. PS: final solution is GOOGLE, he could help you out too but may be slow,
  15. Ok, the point is Skype technology is much better than the others that you guys mentioned. I have been using Skype and love it so much even though the other end has to have Skype installed on their computer. The voice quality on Skype is really something that other companies should improve to be equal or better.I went overseas to Vietnam two months ago and were chatting with my girl over Skype. It was like we were talking over local telephone network. We didnt encounter any signal corruption. It was between VN and Australia. We both were on dial-up connections. What can do better in that situation.Cheap telephone cards use VOIP technology too but they cost some money and not always as good as Skype.If you'd love to talk over MSN, AOL or YM, you should know that the person you wanna talk to must have one of those available on their machine too.I'll tell you what you can do when you wanna talk over the network with costing anything, convince your friends install Skype or whatever communicating software you are using. Hehe, at the beginning, not everyone has MSN, AOL or YM on their machine.Use something that works for you, not something that is popular.Cheers,
  16. Netbeans is open-source too. And I do not agree with the idea that open-source stuff is not good. It depends on who create it and who are involved. And also its community will properly tell something about it. I started with Netbeans before Eclipse and found that Netbeans is very easy to use. I had almost no difficulty at the beginning. It didnt go that way with Eclipse. Before trying Eclipse, I heard people talking about it and the point was that it runs faster than Netbeans (wow, it took my attention). In deed, Netbeans was so slow, and not even much faster at version 4.1. I downloaded Eclipse and it disappointed me at the first time. They are as slow as the other. The speed is quite all right when none of them could approve they are better than the other. So, take a look at their friendliness. I bet that most people could say Netbeans is nicer, well-layouted and well-organised. Ok, if you dont have them installed on your computer, you can have a look at their website. It would tell you something about their products. Netbeans: https://netbeans.org/ Eclipse: http://www.eclipse.org/ One of the points that made me not to use Eclipse is whenever I change workspace, it restarts itself (this is so frustrating). Even though it starts a bit faster than Netbeans but I'm really not happy with it. In Netbeans, if you dont install any add-in rather than its installation files, it starts up fine. Then I go for Netbeans which has everything I need to develop Java applications. Eclipse lovers could have their own reasons but I have read it somewhere said that heaps of Eclipse developers are moving to Netbeans or use both products at the same time. What do you think?
  17. Why? I'm so curious to know the reason, :DOr maybe you put all those code into CODE tag and they were ignored?
  18. I wouldn't use those free shout services unless they provide us somehow backup own shout database. Under whatever circumstances, your website has to have at least one external link to one of these service. This means, the more link you have the slower you site will be loaded. It's the best that you can create your own or adopt someone's work (make sure it's legal to use) and embed them into your site code. You can choose to use iframe or not. In my opinion, iframe is not the best if browser compatibility issue is your big concern.I used to use one of those shout service for a short time and realised it's hard to upgrade those shouts into new system.There are a lot of free tutorial out there helping you create one. I found that most of them written in PHP and may or may not use a backend database like MySQL. You could have a look at my tutorial of making a shout box with text file as your database. Then what, your shout box will be database independent. All you have to worry about when seeking for a hosting service is whether they support php or not. I'm prettty sure that 90% currently hosting service support php.Anyway, this is just my idea which may not be 100% agreed by people who are not very good at web programming stuff. Thanks to those free services. I used to use them when I were a noob (at shoutbox stuff). So, a nice shoutbox with the least of effort, it's worth to have a go. Maybe you will learn something from them and create your own unique one in a near future.Good luck
  19. How about buying an external TV tuner and plug it into the USB port (if any). No physical operation is required. Oops, this wouldn't work unless your laptop is still running. I check on Ebay, a TV tuner should not be so expensive. They're around $30 to $100. Check if it is an option for you. Wow, check this out http://www.ecost.com/eCOST_Stop_Sign.jpg BENEFITS: 2 Ways to Watch: TV or CRT/LCD Monitor Watch TV through USB 1.1/2.0 Interface Watch TV without turning on PC USB 2.0 Compatible Encoder Box MTS/Nicam Support (optional) Full function Remote Controller User-Friendly OSD Adjustment Mode Real-Time Mpeg Encoding Supports YCbCr Video Input FEATURES: USB 2.0 compatible Encoder box Watch TV on PC Video Inputs supported are TV, Composite and S-video Video input format :4:2:2 YUV CCIR-656 High-quality real-time encoding (I-,B-,and P-frames) Export your final works to elementary, Program, Transport, MPEG-1, DVD and VCD MPEG-1/2 capture of up to 8 Mbit/sec Audio capture of up to 384 kbit/sec Full TV frequency range for CATV/VHF/UHF Resizable TV-in-window—up to full screen Enable On Screen Display Function Built-in Video (Composite, S-Video) and Audio (Stereo) input connectors Provides user-friendly OSD (on screen display) to control functions Brightness/Contrast/Saturation/Color/Sharpness Adjustment Built-in microprocessor Full Function Remote Controller Stereo input and Stereo/MTS/Nicam output Supports YCbCr Video input MINIMUM SYSTEM REQUIREMENTS: one available USB port PentiumIII-700 MMX or above CPU 128MB RAM CD-ROM Drive 16MB VGA card with 800x600 16bits resolution ( Director X 8 supported) AC’97 compatible sound card for audio play Windows 98SE/ME/2000/XP
  20. Thank you for your constructive feedback overture . I'm quite more than happy to receive suggestions like that. Just used it as it works, simple isn't it? I will improve it. We human being always make mistakes and rarely do the best. So do I. That's why we have open-source software and such forums like Xisto to share and fix others' mistakes. Hope you understand,
  21. sorry guys, if you'd like to criticise anyone's job, please take some times to investigate their works. Your suggestion is appriciated and helpful but it would not help much.Please at least try the code first, not justlook at it. Or try to hack my shoutbox mates.Enjoy!!!
  22. Thanks szupie, just remove all the color tags in the code comments. I did try bbcode but it doesnt highlight the comments. Hihi, thanks anyway
  23. I believe that people who are looking for a free shoutbox would find this useful. And it is even more valuable to them since it uses merely php code. All shoutbox data will be stored in text file in whatever way of format you would like. I would assume that you guys have some knowledge of PHP and it is no need for me to explain every line of code. If you don’t know much about CSS, you make one as I suggest below. What you need: - A hosting service that allows you to host php pages - Any HTML editor (notepad, EditPlus, … or even Dreamweaver) At the first try, just copy and paste what I post here in the right order. What you have after all steps is just one file call shout.php (could be whatever name ends with .php) and a CSS file. PART 0: PREPARATION If you want to have smilies in your shoutbox, you should create a folder named images under the folder in which you will save the shout.php and common.css. Put all smilies images in that folder and define them in Part I - Step 3. PART I: CREATE SHOUTBOX Note: Please follow all steps. Read the explanation if any, then copy and paste following code. The code of next step should be pasted next to the previous one Step 1: Making file shout.php Open your HTML editor and create a new file then save as shout.php. Remember: if you use notepad, please type "shout.php" (including double quote) when it prompts for file name in Save As dialog. Step 2: Shoutbox header Copy the code below into the file you have just saved. -----------------------START COPY FROM HERE------------------------------------------ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="imagetoolbar" content="no"><link rel="stylesheet" href="common.css" type="text/css"><base target="_self"><title>Tran Tien Dung - Shoutbox</title></head><body class="shoutboxbody" style="overflow-x: hidden;"> -----------------------STOP COPY HERE--------------------------------------------------- Step 3: Shoutbox Configuration In the code below, it is where you configure your shoutbox. The comment will tell you what they are for. -----------------------START COPY FROM HERE------------------------------------------ <?[color=green]/************* CONFIGURATION *****************/// your database file, it will be created automatically if it doesnt exist[/color]$filename = "./shoutdb.txt";[color=green]// use mask for link and email (yes/no). If yes, every link and email in your shoutbox will be displayed as [link] or [email] respectively (defined as below).[/color]$usemask = "yes";$link_mask = "[link]";$email_mask = "[email]";[color=green]// the smiley directory. This is where you place all images for smilies.[/color]$smileydir = './images/';[color=green]// define your own smilies// the shout containing characters like they are defined on the left hand side will be replaced by an image on the right.// you could add more or change them to whatever you'd like[/color]$smileys = array ( "[:)]" => "smile.gif", "[:))]" => "lol.gif", "[:(]" => "sad.gif",); -----------------------STOP COPY HERE--------------------------------------------------- Step 4: Adding some functions They are useful and essential to your shoutbox -----------------------START COPY FROM HERE------------------------------------------ [color=green]/************* FUNCTIONS *****************/// this will prepare all smilies[/color]function alter_smiley(&$item1, $key, $prefix) { $item1 = " <img alt=\"\" src=\"$prefix$item1\" align=\"middle\" border=\"0\" />";}[color=green]// bad words filter, you should add your own ones here[/color]function removeBadWords(&$text) { $badwords = array( "/fu[color=gray].[/color]ck/", "/sh[color=gray].[/color]it/" ); for ($i=0;$i<count($badwords);$i++) $text = preg_replace($badwords[$i], "[:)]", $text);} -----------------------STOP COPY HERE--------------------------------------------------- Step 5: Saving new shout procedures This will check if there is a new shout submitted, it will then save them to the database file. That new shout will be ready to show up. -----------------------START COPY FROM HERE------------------------------------------ [color=green]/************* SAVE SHOUT *****************/// This takes the post vars[/color]extract($_POST);[color=green]// This will store any error message[/color]$errorMsg = "";[color=green]// This executes the script once submit is clicked.[/color]if($submit) { if(!$name) $errorMsg.="You need to input a name!<br>"; elseif(!$shout) $errorMsg.="You need to make a shout!<br>"; elseif(($name=="Name") || ($shout=="Message")) $errorMsg.="Slacker! Say something mate.<br>"; [color=green]// Good, now the essentials are taken care of! " // Let's make the name display a link if there is a site specified.[/color] else { if($site) $author = "<a href='$site'>$name</a>"; else $author = $name; [color=green]// Now we should open the file, or make it if it's not there![/color] $handle = fopen($filename,"a"); [color=green]// Date...[/color] $date = strftime("%D"); $time = strftime("%T"); $ipaddr = $REMOTE_ADDR; removeBadWords($shout); [color=green]// this is how a shout will be stored in your database file[/color] [color=green]// you can change this to your taste but do remember to change the code reading the file[/color] $data = "$author | $date | $time | $ipaddr | $shout\n"; fwrite($handle,"$data"); fclose($handle); }}echo $errorMsg; -----------------------STOP COPY HERE--------------------------------------------------- Step 6: Display HTML form This will display the HTML form on top of the shout box. You could move them to after step 7 to make it appear at the bottom of the page. -----------------------START COPY FROM HERE------------------------------------------ [color=green]/************* SHOW FORM *****************/[/color]echo "<table class=\"SB_formarea\" width=\"100%\" border=\"0\">\n";echo "<tr><td>\n";echo "<form method=\"post\" action=\"shout.php\">\n";echo "<div align=\"center\"><input type=\"text\" name=\"name\" size=\"16\" value=\"Name\" maxlength=\"14\" title=\"Name\" class=\"SB_input\"><br>\n";echo "<input type=\"text\" name=\"shout\" size=\"16\" value=\"Message\" maxlength=\"1024\" title=\"Message\" class=\"SB_input\"><br>\n";echo "<input type=\"submit\" name=\"submit\" value=\":: send ::\" class=\"SB_button\">\n";echo "<input type=\"button\" name=\"refresh_it\" value=\"::\" class='SB_button' onclick=\"window.open('shout.php','_self');\">\n";echo "</div></td></tr></form></table>\n"; -----------------------STOP COPY HERE--------------------------------------------------- Step 7: Display old shouts -----------------------START COPY FROM HERE------------------------------------------ [color=green]/************* DISPLAY SHOUT *****************/// This makes an array with each line in the file [/color]$shouts = file($filename); $rowColor = 0;$count = 0;array_walk ($smileys, 'alter_smiley', $smileydir);[color=green]// We'll add krsort right here! [/color]krsort($shouts);[color=green]// This does the same thing to each part...[/color]$link_search = array("/\</", "/\>/", "/\]/", "/\[/", "#([\n ])([a-z0-9\-_.]+?)@([^, \n\r]+)#i", "#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^, \n\r]*)?)#i", "/(?<!<a href=\")((http|ftp)+(s)?:\/\/[^<>\s]+)/i");if ($usemask=='yes') $link_replace = array("<", ">", ">", "<", "\\1<a href=\"mailto:\\2@\\3\">".$email_mask."</a>", "\\1<a href=\"http://; target=\"_blank\">".$link_mask."</a>", "<a href=\"\\0\" target=\"_blank\">".$link_mask."</a>");else $link_replace = array("<", ">", ">", "<", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", "\\1<a href=\"http://; target=\"_blank\">;, "<a href=\"\\0\" target=\"_blank\">\\0</a>");foreach($shouts as $sbox) { $count++; [color=green]// We'll split it into another array with list and explode.[/color] [color=green]// If you have changed the way data stored, please modify the following line too[/color] list($auth,$date,$time,$ipaddr,$shout) = explode(" | ", $sbox); $shout = " ".$shout; $shout = preg_replace($link_search, $link_replace, $shout); $shout = strtr($shout, $smileys); $shout = chop($shout); [color=green]// Now, we have to output it![/color] echo "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"SB_table$rowColor\"><tr><td class=\"SB_shoutbox\" title='$time $date $ipaddr'><b>$auth</b>: $shout</td></tr></table>\n"; if ($rowColor==0) $rowColor = 1; else $rowColor = 0;}?> -----------------------STOP COPY HERE--------------------------------------------------- Step 8: End of the file -----------------------START COPY FROM HERE------------------------------------------ </body></html> -----------------------STOP COPY HERE--------------------------------------------------- PART II: CREATE CSS FILE Just copy the content below into a file called common.css (should be in the same folder of shout.php). You can modify it if you'd like and make sure you do it properly. -----------------------START COPY FROM HERE------------------------------------------ [color=green]/* SHOUTBOX coding */[/color].shoutboxbody { background-color : #F6FAF9; font: 8pt; scrollbar-face-color: #F5F5F5; scrollbar-highlight-color: #74612A; scrollbar-shadow-color: White; scrollbar-3d-light-color: #D1D7DC; scrollbar-arrow-color: #756023; scrollbar-track-color: #F8F8FF; scrollbar-dark-shadow-color: #98AAB1; font-family: Tahoma, Arial, Verdana, Times; color: #2A7400; margin: 0;}a:link,a:active,a:visited { font-size : 8pt; color : #164000; text-decoration : none;}a:hover { font-size : 8pt; text-decoration: underline;}td { font-size : 8pt; font-family: Verdana, Arial, Tahoma, Times, sans-serif;}.SB_button { background : #DDDDDD; border : 1px solid #C0C0C0; color : #2A7400; font-family: Tahoma, Arial, Verdana, Times, sans-serif; font-size : 8pt; font-weight : bold;}.SB_input { background : #F6FAF9; border : 1px solid #DDDDDD; color : #2A7400; font-family: Tahoma, Arial, Verdana, Times, sans-serif; font-size : 8pt;}.SB_formarea { background-color : #F6FAF9; border-bottom-color : #FFFFFF; border-bottom-style : none; border-bottom-width : 1px; border-left-color : #FFFFFF; border-left-style : none; border-left-width : 1px; border-right-style : solid; border-right-width : 1px; border-top-style : solid; border-top-width : 1px; color : #2A7400; font-size : 8pt;}.SB_shoutbox { color : #2A7400; font-family: Tahoma, Arial, Verdana, Times, sans-serif; font-size : 8pt; text-align : left;}.SB_table0 { background-color : #F6FAF9; border-bottom-color : #CBE2DD; border-bottom-style : none; border-bottom-width : 1px; border-left-color : #CBE2DD; border-left-style : none; border-left-width : 1px; border-right-color : #CBE2DD; border-right-style : none; border-right-width : 1px; border-top-color : #CBE2DD; border-top-style : solid; border-top-width : 1px; color : #2A7400; font-size : 8pt;}.SB_table1 { background-color : #F6FAF9; border-bottom-color : #CBE2DD; border-bottom-style : none; border-bottom-width : 1px; border-left-color : #CBE2DD; border-left-style : none; border-left-width : 1px; border-right-color : #CBE2DD; border-right-style : none; border-right-width : 1px; border-top-color : #CBE2DD; border-top-style : solid; border-top-width : 1px; color : #2A7400; font-size : 8pt;} -----------------------STOP COPY HERE--------------------------------------------------- CONCLUSION I have not explained the database format. However, it is not hard to find out since you have some shouts in it. You can see the demo on my website (http://blog.coolersport.info/) If anything's unclear, feel free to ask Good luck everyone -----When you have codes in your post, put them in code bbcodes so that the system gives you the proper amount of hosting credits. I edited them for you, if you want any changes (for better appearance/copying/etc.), just ask me to do so. -----szupie
  24. Okie, it's quite simple. Browsers load your HTML from top to bottom too. However, you can use JavaScript to control this. I guess there must be several ways working around. This is my idea, it should work.Let's say you have some HTML code like this:<html><body><img src="images/banner.jpg">Some text here</body></html>and you want your banner, in this case, loaded last. Then you could do something like this.<html><body><img id="banner" src="images/blank.jpg">Some text here<script language="javascript">document.getElementById("banner").src = "images/banner.jpg";</script></body></html>To do with div/span/table you could do as following:<html><body><img src="images/banner.jpg"><span id="somethingloadlast"></span>Some text here<script language="javascript">document.getElementById("somethingloadlast").innerHTML = "Hello my <b>friend</b>, I am loaded after all, ";</script></body></html>You can do similar thing for div or table using innerHTML property. You can substitute anything with new HTML code with this technique. Remember to put your script code at very end of your page (just before </body> tab).If you aren't clear at any point, let me know,
  25. PS: for detail explanations of each configuration in about:config window, please read http://preferential.mozdev.org/preferences.html {could anyone merge this post to the one about, thanks heaps}
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.