web541 Posted October 28, 2016 Report Posted October 28, 2016 I've seen this before when you use multiple lines when posting news, etc. So fi you say: Grand Opening Tuesday... It will go into the database like Grand Opening r/n/r/n/Tuesday... I fixed the issue by replacing the textareas with WYSIWYG editors, have you used these while posting? In the template file, it will look like this (ish) <textarea name="content" id="editor" style="width: 90%; height:350px;"></textarea> If it does, then I'm unsure Quote
TAV1702 Posted October 28, 2016 Report Posted October 28, 2016 I used a WYSIWYG once in the Forum that Simpilot released but it had a loop hole in it (not the forum but the WYSIWYG I used) and I have been afraid to try one since. If you know of a decent one I can try, I'm all ears. Here is one text area in my files <tr> <td>New Event Description</td> <td><textarea name="description" rows="4" cols="40"><?php if(isset($event)) {echo $event['description'];} ?></textarea></td> </tr> And here is the other. <tr> <td>Event Description</td> <td><textarea name="description" rows="4" cols="40"><?php echo $event->description; ?></textarea></td> </tr> Quote
TAV1702 Posted October 28, 2016 Report Posted October 28, 2016 Well, I went with the phpVMS WYSIWYG and I still got this on a test post. \r\n Look ma! Its another test! \r\n I'm scratching my head now. I look in the database and the post is clean. It is just fine. Quote
web541 Posted October 28, 2016 Report Posted October 28, 2016 (edited) As I said before, I'm unsure now. But I do know that it is probably the <br> tag that is causing the issue. Try this in your output template <?php $buffer = str_replace('\r\n', '<br>', $buffer); echo $buffer; ?> Or you could use the trim() function <?php $buffer = trim($buffer); echo $buffer; ?> And see if that works. As for the Chicago\'s, the data is probably using the DB::escape method so yeah, it'd be stripping slashes /** * Format a mySQL string correctly for safe mySQL insert * (no matter if magic quotes are on or not) * * @param string $str String to escape * @return string Returns the escaped string * */ public function escape($str) { return mysql_real_escape_string(stripslashes($str), $this->dbh); } Edited October 28, 2016 by web541 1 Quote
TAV1702 Posted October 30, 2016 Report Posted October 30, 2016 Thanks web I'll give that a try and see how it goes. I actually went and discabled the news function in the events module just because for now. Most likely tomorrow I will uncomment and try your code. I really do appreciate the info. Quote
treygeboy Posted January 30, 2017 Report Posted January 30, 2017 (edited) Not saving my event. When i click on save event after entering all of the information it does not save it and does not show up. Please help?? EDIT: FIXED JUST HAD TO RELOAD THE SQL FILES Thanks, Trey Edited January 30, 2017 by treygeboy Update Quote
Tummi Posted March 2, 2017 Report Posted March 2, 2017 Do i understand right that i have to create the Schedule in the Database, too? Quote
Administrators ProAvia Posted March 2, 2017 Administrators Report Posted March 2, 2017 (edited) To set up an event you do not NEED to have anything set up yet. But eventually you will need a departure airport, an arrival airport and at least one active schedule (with a flight number) so your pilots can fly the event on your scheduled date and time. Edited March 2, 2017 by ProAvia clarification Quote
djtiger76 Posted February 12, 2020 Report Posted February 12, 2020 (edited) On 3/11/2011 at 6:51 AM, James142 said: Ah i was putting the code in the wrong place, thanks! James, I know this post is ancient.. I am trying to add just the images to my dashboard but not working It is wrapped in img tag but i don't know what you mean by you were putting the coding in the wrong place. I just want the image to show on the dashboard under "Upcoming Events" (see image) This is what I have for that section: <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Upcoming Events</h3> </div> <div class="box-body"> <img src="<?php echo $event->image; ?>" alt="Event Image" /> </div> </div> Edit: Figured it out. Edited February 15, 2020 by djtiger76 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.