Jump to content

Recommended Posts

Posted

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

Posted

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>

Posted

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.

Posted (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 by web541
  • Like 1
Posted

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.

  • 3 months later...
Posted (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 by treygeboy
Update
  • 1 month later...
  • Administrators
Posted (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 by ProAvia
clarification
  • 2 years later...
Posted (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>

eventweb.JPG

 

Edit: Figured it out. 

Edited by djtiger76

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...