
Vermillion
Members-
Posts
118 -
Joined
-
Last visited
Never
Everything posted by Vermillion
-
[SOLVED] Counting How Many Lines Are Inside Certain Markup Tags.
Vermillion replied to Vermillion's topic in PHP Coding Help
My apologies for the bump and double post, but can anyone explain the code to me? Being trying to figure out how it works for about 2 weeks now, with no avail. -
[SOLVED] Counting How Many Lines Are Inside Certain Markup Tags.
Vermillion replied to Vermillion's topic in PHP Coding Help
Ah okay, I see that now. Thanks a lot. Now, my last request. Can someone comment/document that code? I am having a very difficult time trying to understand it completely ;_;. -
[SOLVED] Counting How Many Lines Are Inside Certain Markup Tags.
Vermillion replied to Vermillion's topic in PHP Coding Help
Hm, the function is not doing what I wanted. When I echoed it just printed "Array". I want it to actually return an integer value. When I use var_dump I see the whole array, and that really wont help me for what I want to do. Any modifications I can do to make sure it returns just an integer? -
[SOLVED] Counting How Many Lines Are Inside Certain Markup Tags.
Vermillion replied to Vermillion's topic in PHP Coding Help
Thanks for all the help, now thought, the code is quite abstract for me: why are you using foreach? I though it was just used for arrays, and I don't see anything with arrays there, I see just see them after the foreach loop ;_;. -
[SOLVED] Counting How Many Lines Are Inside Certain Markup Tags.
Vermillion replied to Vermillion's topic in PHP Coding Help
Okay, been trying to figure out how I would use them all, but I still can't find my answer. Any other help on how exactly should I used them? I will really appreciate it. -
[SOLVED] Counting How Many Lines Are Inside Certain Markup Tags.
Vermillion replied to Vermillion's topic in PHP Coding Help
How would I explode everything inside the code tags, then? I don't want to explode the whole string, because the users may submit other tags that are outside the Code tags. -
When the user submits content inside the [code][/code] tags of my site, I want to count how many lines of text are inside the tags. For example: [code] <a href="lol.php>Inside</a> <br /> <strong>Go to lol site</strong> [/code] There are three lines of text inside the code tags. How can I make PHP tell me that?
-
Code on XHTML strict. When I was working on my second website, I was able to code properly for IE, Firefox and other Mozilla based web browsers. I did that by coding on XHTML Transitional. ... But later I considered the fact that a lot of people use Safari as their browsers. Google Chrome is widely used now as well, and both have the same rendering engine. They I tried my XHTML Transitional website on those browsers. And lord should you have seen the mess I created. Later I found out that coding on XHTML Strict increases your chances of making a website that looks fine on almost every browser. Checking the user client with PHP is not always a reliable method. I heard that people can choose whether they can send the client information to the server or not.
-
Personally, I would go around learning C++ before C#. Both are Object Oriented Programing languages, but C# is completely based on that, almost like Java. Though even before Java (which I have yet to learn) sounds like an awesome first choice. Personally it calls my attention for the simple reason that it has no Pointers ...
-
I believe this is often the case. There have been some problems presented in some topics that I genuinely found interesting, and that made me research the topic and sometimes write small scripts that I thought were pretty neat. Same here. I just saw someone asking about selecting just one field in a SQL query, and since I didn't know, I did some research, to see if I use that in the future. You learn more by helping and by receiving teachings from fellow members. That's how I learned PHP, pretty much. I just read one book to get started, but I got the advanced knowledge from other members.
-
<?php mysql_query("SELECT * EXCEPT field1, field2, etc FROM table WHERE); ?> There are probably better methods to do that.
-
When users submit [im]link to image[/img] into my server, I want to take the image out of the image tags to check the image individually. How can I take the link out of the tags?
-
Does anyone know a PHP pluggin for Visual Studio? I love to use Dreamweaver for my PHP code, but Visual Studio does have a better IDE when it comes to programming (IMO, at least), and I would like to put as many IDEs possible in one. I have found for PHP that looked extremely sweet... But it costs $100, and I can't get it. It is vs.PHP. If anyone can help me this I will highly appreciate it .
-
I would recommend opening the file with Notepad. If it happens with notepad too... Then my only guess is that your file is quite buggy.
-
Hi guys. I am trying to make a signature system for my custom made forum system. I have been working hard on "my framework" in the past weeks, and now it happens that I am stuck without being able to find a solution. It is a Signature class, but I don't need help with the OOP. I need help thinking in a way and functions that will help me achieve what I want to achieve. <?php /*-----------------------------------------------------------------------------*/ # SCRIPT: Signature Validator # # SCRIPT NAME: class.signature.inc.php # # AUTHOR: Andrés Ibañez | Vermillion. # /*-----------------------------------------------------------------------------*/ class Signature{ private $counter; //Keeps track of the "points". private $signature; final function __construct($signature){ $this -> signature = $signature; } final function validateImages(){ #Comming soon. } final function validateText(){ } } ?> This is how I want my signature system to work: It is based in "Points". Each BBCode will add a certain amount of Points and will update the value on the 'counter' member. If the number on Counter is over 300, then the signature is invalid and the user should cut down some of its content. So now that you know how it works, the following BBCode tags will add points: [size=1][/size] = 5 points. One Linebreak = 10 points. Div tags = 15 points. Pictures that are bigger than 400 x 100 = 100 points. Pictures less then 400 x 100 = 50 points. Also, pictures in the signature shouldn't be bigger than 575 x 125 pixels I really need to get this done, and I can't seem to figure out what to do, so any help will be highly appreciated !
-
Well, a certificate is a certificate one, right? I guess the Zend one is powerful, but wouldn't having more of them give you more chances at the time of getting a job?
-
Installing Smarty When I Can't Modify php.ini
Vermillion replied to Vermillion's topic in Applications
Ah okay, thanks for that. Just refresh my memory. usr/share/php Inside the "php" directory, I have the htdocs directory, right? I can't check all the directories since I am on FTP to upload the files, I can just the directory that keeps htdocs inside. -
Installing Smarty When I Can't Modify php.ini
Vermillion replied to Vermillion's topic in Applications
Will set_include_path() modify the php.ini file? I used get_include_path(), and I don't know where I will find this: .:/usr/share/php:/tmp lol -
Installing Smarty When I Can't Modify php.ini
Vermillion replied to Vermillion's topic in Applications
Woah woah, that's certainly something. Thorpe, if I used your method, can I actually set that include path to a folder that is out of my www/htdocs folder? And I am assuming I will need to include that on every file that uses Smarty, right? -
First, I hope I got the right forum... I use [http://www.07x.net 07x] (which sucks btw, but can't find anything better) as my host. I want to install Smarty because it seems like that thing owns when it comes to separate HTML from PHP. I have found [http://news.php.net/php.smarty.dev/2703 this guide] (well, Huntyr linked me to it ;P), and the main problem is that I can't modify the php.ini file to add a new includes location. I know I could change the installation guide a bit, but I heard that keeping the Smarty files out of the htdocs/www folder is safer. If anyone has a possible solution, I will highly appreciate it ._..
-
Okay, thanks, though I am still confused a bit: <?php $rstring = "So 'this' will use magic quotes?"; $rstring2 = "But \'this\' will not?"; ?>
-
My apologies for the question I should know by now, but I never learned about PHP's configuration file. What exactly ARE magic quotes? People tell me I use them and I should avoid them for PHP 6, but I can't avoid something I don't know.
-
Okay, thanks for the answers guys!
-
And that certificate does help you if you want to get jobs in the future, right?
-
Seriously? So (this is of course not true ) if I had all the skills I could take the test even though I am only 16?