User System |
[eluser]majidmx[/eluser]
Glad to hear it worked eventually ... To make your code more accurate, try to put all those configuration in the config.php file of the config folder and try to execute the DB queries from a Model, and get the results in the controller. For the issue you mentioned, what's the problem ? I just can not figure it out what's the problem ? Do you mean the line breaks ? if YES, then take a look at typography class Here. and if NO, please explain more ![]() Take care, MajiD Fatemian
[eluser]plasmagames[/eluser]
ok, heres what i mean. I want to know how to get the text to format the way i want it. So if i type: Here is an example of what i mean and here what i want it to be like: Here is an example of what i mean not like this: GoogleHere is an example of what i mean
[eluser]majidmx[/eluser]
did you tried the Typography Helper ? it is exactly what you need.
[eluser]jcavard[/eluser]
@plasmagames Come on Dude! The CI Community sure is one great, but for f* sake, would you at least read some tutorials, search twikis, browse forums before posting every GD errors you get with code people gave you in the first place? Try to understand what you're doing, instead of begging for code. damn, that's sad.
[eluser]plasmagames[/eluser]
ok so i read the page how would i sue it in my view file Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[eluser]plasmagames[/eluser]
would it be like this? Code: $string = auto_typography($row);
[eluser]plasmagames[/eluser]
and to you comment jcavard. I don't learn buy reading tutoials and wiki's I learn by video tutorials and coding something and if theres errors get other to help me fix them. Since I am completely new to CodeIgniter in this case. we all learn in different ways, so shut the hell up. Please
[eluser]jcavard[/eluser]
You're not proving me wrong dude! Just look in the User Guide, and you will see the auto_typography() syntax! That's what I meant. http://ellislab.com/codeigniter/user-gui...elper.html Code: // you usually put this in your controller then replace your foreach Code: <?php foreach($query as $row): ?>
[eluser]plasmagames[/eluser]
ok, i have gotten to the comments part where it displays them. So far the script will submit the comments but won't display them. Heres what the browser gives me Quote:Fatal error: Call to a member function num_rows() on a non-object in /home/pmgames/public_html/code/system/application/views/newscomment.php on line 16 Here's the Code for the comment view file Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> and heres the controller Code: <?php
[eluser]majidmx[/eluser]
Please pay more attention to the user_guide. As you can see here [http://ellislab.com/codeigniter/user-gui...sults.html] , you can use ->num_rows() on a query object not a query_result object. here is the correct one : Code: $query = $this->db->query('SELECT * FROM my_table'); Code: $query = $this->db->query('SELECT * FROM my_table')->result(); Each class has it's own methods and properties. When you face an error which seems to be so simple, there should be something wrong with your code, spend more time on tracing your code, though the error itself is self-explaining. |
Welcome Guest, Not a member yet? Register Sign In |