-
Content Count
1,008 -
Joined
-
Last visited
Everything posted by vujsa
-
Try this: <td onMouseOver="this.bgColor = 'navy'" onMouseOut ="this.bgColor = 'Blue'" bgcolor="Blue"> your link here </td> Hope this helps. vujsa This can also work for the entire row if applied to the <tr> tag instead of <td> tag.
-
FTP: Access Denied For Newly Created User (cPanel) Help pls
vujsa replied to chaosx2x's topic in Websites and Web Designing
Here we go. ftp server: ftp.subdomain.astahost.com username: username@subdoman.astahost.com password: newuserpassword Type this information into you account manager substituting your information for username and domain name. Good Luck, vujsa -
Okay, download the theme you want.Unzip the theme into its own file.If your themes name is Sunset, then uploade the entire Sunset directory including the Sunset filefolder to the server. Make sure that you upload the file to the Themes directory. (Probably public_html\php-nuke\Themes)So, you should have something like thi http://forums.xisto.com/no_longer_exists/ /php-nuke /admin /images /includes /themes /DeepBlue /Odyssey /Sunset /Traditional /Your-New-Theme-Here /index.phpHope this helps some. vujsa
-
Frequently users post a new topic and realize that they left something out or there was an error or something else was wrong with the post. As a result, they need to edit the post but they don't have an edit button. So the question is, how can the post be edited? First of all, I'll explain the reason that there isn't an edit button. There is a small system glitch that causes a problem when members attempt to edit their own topics. Basically, the system can't properly adjust your hosting credits correctly when certain circumstances are present. Because this negatively affect most of the members in the forum, editing was turned off. Second point at hand, will editing be turned back on? The answer to that is no. As long as the glitch continues, editing will remain off to prevent you hosting credits from being incorrectly adjusted. So, how do you edit your topic. Well, here are the directions: Step 1 Go to your post an press the reply button: In your reply, simply state what you need to have fixed: Step 2 Click on the the report button: In your report message let the staff know what you need to have done: Then click the submit button: Step 3 Finally, a moderator will edit your post for you and make all the needed changes: Hope this helps. vujsa Mini Note From Dooga: Edited the screenshots to remove moderator buttons and views and provide a more acurate picture
-
The "." specifies to match all charaters. So here is an example: $string = "Hello world! Welcome to my example. <br />\n Please feel free to increase my reputation points! <br />\n Thank you.";$string2 = preg_replace('@.*?\sThank you.@si', 'Hello world! How cool am I!', $string);echo "<html><head><title>Content Capture</title></head><body><b>Test String:</b><br />\n $string <br /><br /><b>New Data:</b><br />\n \n\n $string2 <br /><br /></body></html>"; Returns: So '@.*?\sThank you.@si', means match all characters up to and including one space followed by "Thank You." Basically acts like a wild card. So for '@<script[^>]*?>.*?</script>@si' the "." means match all characters in between the <script ...> and </script> tags. preg_replace() is Pattern Regular Expression Replace function. Works like ereg_replace() but a little more complex, more flexible, and slightly different syntax. Basically, you can use an array of patterns that when matched will be replaced by the coresponding value in an array of replacement values. Instead of typing ereg_replace() over and over, just use the array method with preg_replace(). For more information try the PHP Web Site About PCRE Hope this helps. vujsa
-
Wow, MC, again a lot more information than I though I needed to know. That's what's nice about your post, they answer the next three questions too. The PHP site has a very nice expaination of the differences between PHP and Perl regex. The problem is tha I don't know Perl regex either. As you mentioned, you haven't doen much with PCRE so I really appreciate you going ahead and helping anyhow. I tend to stay away from stuff if I have to research it before I can answer the question. The explaination you gave for the '@<script[^>]*?>.*?</script>@si', was very helpful. It being the most complex statement in the array, gives the most oppurtunity to learn from. Now that I know how it works, this statement will be my starting point for learning regex. [^0-9]*?! really clarified how the greedy usage for me. Here is what I came up with before you got back. <?php $filename = "http://forums.xisto.com/no_longer_exists/ = file_get_contents($filename);// $document should contain an HTML document.// This will remove HTML tags, javascript sections// and white space. It will also convert some// common HTML entities to their text equivalent.$search = array ('@<script[^>]*?>.*?</script>@si', // Strip out javascript '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags '@([\r\n])[\s]+@', // Strip out white space '@&(quot|#34);@i', // Replace HTML entities '@&(amp|#38);@i', '@&(lt|#60);@i', '@&(gt|#62);@i', '@&(nbsp|#160);@i', '@&(iexcl|#161);@i', '@&(cent|#162);@i', '@&(pound|#163);@i', '@&(copy|#169);@i', '@(\d+);@e', // evaluate as php );$replace = array ('', '', '\1', '"', '&', '<', '>', ' ', chr(161), chr(162), chr(163), chr(169), 'chr(\1)', );$search2 = array ('@.*?Latest Member:\s@si');$replace2 = array ('');$text = preg_replace($search, $replace, $html);$text2 = preg_replace($search2, $replace2, $text);echo "<html><head><title>Content Capture</title></head><body><b>Test String:</b><br />\n $text <br /><br /><b>Extracted Data:</b><br />\n \n\n $text2 <br /><br /></body></html>";?>With the following output: Actually, the general explaination is quite helpful because ultimately, my example is just a way for me to learn how to do more complex things with regex. Come to think of it, if I could just borrow you brain for a few days, it would really save on the typing. Hey, thanks for all the help. vujsa By the way, the "s" modifier at the end of the regex as explained by the PHP web site:
-
I believe that the "S" was required by many servers in the past to tell Apache that the file used Server Side Includes. Just like many hosts are set up to allow PHTML to be used to tell Apache that the PHP parser will be used for the file. Now that SSI is a standard feature on most hosts, many hosts have simply configured Apache to handle the request for SSI without the need to specify SHTML. vujsa
-
Well, I've been playing arround with this a bit now and am beginning to understand some of it.The "@" is used as a delimiter. Nearly anything will work I guess except escape "\". Pipe "|" or Slash "/" could have just as easily been used.Eagerly awaiting more of your vast knowledge! vujsa
-
So I'm trying to learn how to pull useful content from a web page. Here's what I got so far: <?php $filename = "http://www.forum500.com/rg-erdr.php?_rpo=t = file_get_contents($filename);/* **************************************************************** *//* *//* Got this code @ http://php.net/ *//* *//* **************************************************************** */// $document should contain an HTML document.// This will remove HTML tags, javascript sections// and white space. It will also convert some// common HTML entities to their text equivalent.$search = array ('@<script[^>]*?>.*?</script>@si', // Strip out javascript '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags '@([\r\n])[\s]+@', // Strip out white space '@&(quot|#34);@i', // Replace HTML entities '@&(amp|#38);@i', '@&(lt|#60);@i', '@&(gt|#62);@i', '@&(nbsp|#160);@i', '@&(iexcl|#161);@i', '@&(cent|#162);@i', '@&(pound|#163);@i', '@&(copy|#169);@i', '@(\d+);@e'); // evaluate as php$replace = array ('', '', '\1', '"', '&', '<', '>', ' ', chr(161), chr(162), chr(163), chr(169), 'chr(\1)');$text = preg_replace($search, $replace, $html);echo $text;?>The only line that I don't completely understand is: '@<script[^>]*?>.*?</script>@si', I know what it does, I just don't know how. Here is the output: So lets say I wanted to get the name of the Latest Member. So, how do I get just that information? Any help here would be great. vujsa
-
Hey spacewaste, you're welcome.I was glad to have helped. Let me know if you have other projects you want some assistance on.I think instead of posting the files at SMF Forums, I'll fix up the zip file a bit and post a message at SMF and refer to this topic. Might as well get some visitors to Xisto in the process.Anyway, I'm glad everything worked out for you.Trekkie101, you were quiet during the entire topic until we really needed you, thanks for the help.vujsa
-
Web Advertising: Pop-ups Is it *really* working?
vujsa replied to everydaysushi's topic in Websites and Web Designing
IF pop-ups didn't work, then we wouldn't see them. Just like telemarketers calling on the phone. I never by from telemarketers but they still call, so someone is buying. I find pop-unders to be more frustrating because you don't realize they are there sucking up valuable system resources. Netscape catches most of my pop-ups now so I rarely even notice that they exist. Anything that gets by Netscape is usually picked up by Norton. In fact, I had to lighten up on the blocking because I could see any banners on my website. Hey moon, particularly funny because I assume you and your nephew have different taste. - if not, no offense intended. Just my opinion, vujsa -
I was reading the Tutorials and How To's forum and ran accross this execelent SMF tutorial by Trekkie101. SMF - Asta Style!. As far as I'm concerned, this is required reading prior to installing SMF on your website. Trekkie101 probably has the most experience with this bulletin board system among the Xisto membership. He really put a lot of work into this tutorial and I think it gets overlooked by being hidden away there in the Tutorials and How To's forum. Have a look. vujsa
-
"Very nice tutorial. Explains why I couldn't get the newline (\n) character to work the other day. " Very interesting subject. You're like a walking PHP textbook. " I'll start using these techniques from now on. Thanks for the info. " I would like for you to go into more detail about concatenating strings. " When do we use a * period and when do we use a (,) comma. I was thinking that commas are used when inserting a function call into a string and the period is to join strings to strings, variables, and interpolated strings. Please correct me if I am wrong. Anyway, did you catch that hint ?" - If you didn't, are you missing a double quote? vujsa
-
Hey, thanks for the tip. That'll really help spacewaste out but he'll need to adjust for the change. spacewaste, you'll need to modify your script again to make guest shouts work and still look okay. In shout.template.php > function template_shout_box(): <around line 94> Find: [tab][/tab]if ($user_info['is_guest']) {and change to: [tab][/tab]if ($user_info['is_guest'] && !allowedTo('make_shout')) { Here is a new shoutbox_helios.ZIP file with all of the changes needed: FTP: shoutbox_helios.ZIP (No Password Required) Just replace the old shout.template.php with the new one in the ZIP file. Let me know if you have any problems. DON'T FORGET TO BACKUP THE OLD FILE FIRST! vujsa
-
More Problems Still more problems...
vujsa replied to nakulgupta's topic in Websites and Web Designing
cuteFTP tends to drop files during upload when an error is encountered. Errors such as too many connections to the server etc.Instead of transfering folders, try to transfer iniviual files by highlighting all of the files to be transfered the clicking upload (download). Then if you have a problem, you can just start with the problem file. The queue will display error messages next to files that were aborted. Just remove the status of the problem file (usually at the top of the list) and click transfer queue.Let me know if you need more help. Always around for assistance. vujsa -
SMF is the only BBS template I've worked in and I'll have to say that it is quite easy. Of course, it depends on what you are doing and where you start. The default template for SMF is very easy to navigate through but other template sets are very complex and less explained.Helping spacewaste with putting the shoutbox in the Helios template was a bit of a challenge. Comments that were phantoms and all-in-one-line html code assigned to variables was diificult to read through. I would suggest learning how to work with the default SMF template before attempting one on your own or modifying a third party template.vujsa
-
Glad that we got it working for you. Looks like your users are already enjoying it quite a bit.I'll research the guest posting issue. The script was obviously written to allow guests to post shouts but isn't working. Maybe the SMF Forum can help us out. May take a few days, its a little slower that Xisto.Let me know if you need anything else. vujsa
-
Okay, to fix the limit on the number of characters allowed in the shoutbox input field, you'll need to get rid of the maxlength attribute set be default.In shout.template.php at the bottom of the page look for the function template_shout_form(): function template_shout_form(){ global $context, $settings, $options, $txt, $user_info, $scripturl, $modSettings, $ID_MEMBER; echo ' <td style="align: right; verticle-align: bottom;"> <form action="', $scripturl, '?action=shout" method="post"> <input type="hidden" value="', $context['qstr'], '" name="qstr" /> <input type="hidden" value="" name="email" />'; if ($user_info['is_guest']) { echo ' <input type="hidden" value="0" name="memberID" /> <input type="text" value="', $txt['shoutbox_6'], '" name="displayname" maxlength="100" onfocus="this.value=\'\'" /> <input type="text" value="', $txt['shoutbox_7'], '" name="email" maxlength="100" onfocus="this.value=\'\'" />'; } else { echo ' <input type="hidden" value="', $user_info['name'], '" name="displayname" /> <input type="hidden" value="', $ID_MEMBER, '" name="memberID" />'; } echo ' <input type="text" value="', $txt['shoutbox_8'], '" name="message" size="30" maxlength="100" onfocus="if (this.value == \'', $txt['shoutbox_8'], '\')this.value=\'\'" /><br /> <input type="submit" name="submit" value="', $txt['shoutbox_9'], '" /> </form> </td> </tr> <tr> <td colspan=2 style="text-align: center;"><a href="', $scripturl, '?action=shout_archive"><b>', $txt['shoutbox_43'], '</b></a> </td> </tr> </table>';}?> Change: <input type="text" value="', $txt['shoutbox_8'], '" name="message" size="30" maxlength="100" onfocus="if (this.value == \'', $txt['shoutbox_8'], '\')this.value=\'\'" /><br /> To: <input type="text" value="', $txt['shoutbox_8'], '" name="message" size="30" maxlength="0" onfocus="if (this.value == \'', $txt['shoutbox_8'], '\')this.value=\'\'" /><br /> Seems odd for the default template to have this limit on it.That should fix the problem. vujsa
-
Here are the needed templates and a couple of instructional images. FTP: shoutbox_helios.zip (No Password Required) Anyway, to allow guests to post shouts, would require some programing modification to the main shoutbox script (shout.php) a little outside my specialty. As far as the maximum characters, click your Admin button > Edit Features and Options > Shoutbox See Admin1.jpg (in zip file) Now change the maximum characters per line as seen in Admin2.jpg. Make sure that you backup the original shout.template.php and index.template.php files before you upload the new ones. If you have made other mods and replace the index.template.php, then things will be messed up. If that is the case, then we'll need to figure out a different method of updating your files. I'm pretty sure that I have everything setup correctly, by I really think that you should make backups first. These files go to the following folder: {SMF Directory} > Themes > helios {SMF Directory} = The place where you installed SMF - Probably: /public_html/ /public_html/forum/ /public_html/smf Let me know if you run into trouble. vujsa
-
I have notice a fantastic uptime rate. In fact, I don't think that you could find a better paid service than you get here. On occassion, there have been slow downs but those were caused by sever upgrades (decent trade off). I suggest that you host your site here and if you don't feel that you are receiving the best possible service, then feel free to try for a better provider. As if one existed. vujsa
-
Okay, did a little tweaking and added an IF conditional statement that adds "</tr></table>" if the user is a guest, otherwise, the input form code is added to the right of the shout area. Shouldn't be anymore bugs now. From here all that is needed is to specify how you want everything else to look. I removed the timestamp and the admin delete option from each line. These can be put back in but I felt that they made the shouts hard to read. These are still available in the full view. In fact, the two were identically formatted before I modified the shoutbox. As said in a previous post to chaosx2x, I'm looking for a way to add a bbc helper to the shoutbox so it doesn't need to be manually coded every time. hope this helps. vujsa
-
Hey I thought those were taken care of. By default, the shoutbox only works for registered users. That's why there isn't a text box and submit button unless you log in. The lines are actually pieces of the box border out of place. It only does it for none logged users. Will need to figure it out then let you know. Must have something to with terminating the table if the user is a guest. Also, need to figure out how to get the View All to show up for guests. vujsa
-
Don't sweat it man. Template moding is extremely complex. This template set is one of the most complexed I've seen. I think I've got the feel of this template now so I should be able to format the shoutbox just about any way you need. I think all of the bugs are gone in the test site so take a look. Give me some feedback and I'll tweak it for you. I moved the shoutbox above the menubar because everything below the menubar is controlled by page specific templates. Also, I can move the shoutbox into the collapsable portion of the page at the top. vujsa
-
Recovering Files From Raw Partitions Reinstalled Windows...
vujsa replied to szupie's topic in Websites and Web Designing
Just because it saya that it is raw, doesn't mean that the drvie was reformated, it just means that windows doesn't know haow to read it. Read this: Disaster Recovery. Hopefully it will help. I have one concern. You said that formating the HDD took seven hours. Even with a large HDD, it shouldn't have taken so long with a quick formate. This leads me to belive that a full formate was done. If so, then zeros were written to the HDD. Basically erasing all data. See, deleteing a file and even quick reformating just tells the registery that the space used by that data is available. And even writing over the data doesn't completely erase it. Writting zeros to the drive is a little more thorough. It may have destroyed everything and you may not get it back. Goog Luck. vujsa -
Okay, there is a permission problem with the shoutbox. It only show for admin. I'll fix that. The size of the box is directly related to the number of posts displayed in the box. (10 by default). I'll move the input box and submit button to the right side of the shoutbox similar to Xisto..Additionally, the shoutbox isn't appearing on any page other than HOME.I'll figure it out.vujsa