Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Embedding a Youtube video
1 2
Groefie
Posted on 29 Jun 2010, 11:51:06

Access: Member
Total Posts: 13
Joined: 2010-06-28

Hi,

is there an easy way to embed a Youtube video into an article with the new wysiwyg editor, just like adding an image? The only way I found is by clicking on the html button at the right and paste the code in there.
#2582
Chris
Posted on 29 Jun 2010, 18:34:43

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

When I integrated CKeditor it had a lot of extra toolbar buttons that while useful, took up more space than I liked so I removed them. The ones I removed I also deleted the plugin folder for each one aswell to reduce the filesize of the overall package.

So to add the flash button back onto the toolbar you just need to download a copy of ckeditor from here

http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.3.1/ckeditor_3.3.1.zip

Extract and navigate to the ckeditor/plugins folder, here you'll see the "flash" directory, copy this folder and upload it to your own server here "news/js/ckeditor/plugins"

Now edit your config.js file located at "news/js/ckeditor/config.js", you'll see the toolbar settings here

Code:
    ['Font','FontSize','Bold','Italic','Underline','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','NumberedList','BulletedList'],
    ['TextColor','customimage','customsmiley','Link','customfiles','Table','-','Outdent','Indent','-','Source']
    ];


Add 'Flash' wherever you want the flash button to appear, so if you want it to appear at the beginning of the toolbar change it like so

Code:
    ['Flash','Font','FontSize','Bold','Italic','Underline','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','NumberedList','BulletedList'],
    ['TextColor','customimage','customsmiley','Link','customfiles','Table','-','Outdent','Indent','-','Source']
    ];


Be sure to edit both instances so that the flash button appears on both the article and summary box.
#2584
Chris
Posted on 29 Jun 2010, 19:00:39

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I made a new download which contains all the original plugins and adds them all to the toolbar, that way you can remove which ones you don't need.

http://code.google.com/p/n-13news/downloads/detail?name=n13news3.7_fullwysiwyg.zip&can=2&q=

Download this and upload the news/js folder to your own server replacing any files as needed.
#2585
Last edited by Chris at 2010-06-29 19:04:03 Reason:
Groefie
Posted on 29 Jun 2010, 19:48:35

Access: Member
Total Posts: 13
Joined: 2010-06-28

Hi Chris,

thanks a lot! Works like a charm :grin:

Everything seems to work fine now except for the friendly urls. As soon as I enable friendly urls in the controlpanel all articles disappear from the site. I've already changed the path in .htaccess to /index.php but no luck. Also tried with /2010/index.php (as I am testing the site into a folder called '2010') but no luck also. Any idea what goes wrong here? The mod_rewrite module is enabled in Apache on the server.
#2586
Chris
Posted on 30 Jun 2010, 14:03:08

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

When you enable friendly URLs, is it only the news articles disappear or is it any page that has the news system included into it? Can you link me to your site so I can see the problem myself.
#2591
Groefie
Posted on 30 Jun 2010, 14:55:31

Access: Member
Total Posts: 13
Joined: 2010-06-28

Hi Chris,

all the news articles disappear from any page that has the news system included.

I've sent a pm with the site and login of the N-13 News cp.
#2593
Chris
Posted on 30 Jun 2010, 15:13:52

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

This is to do with the way friendly URLs work, if you edit the .htaccess file and change it to

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /2010/bericht.php [L]


Then edit the templates so that instead of pointing to

/2010/bericht.php?={id}

Then show like this

/2010/{id}-0-{friendlytitle}
#2594
Groefie
Posted on 30 Jun 2010, 16:08:23

Access: Member
Total Posts: 13
Joined: 2010-06-28

Hi Chris,

thanks. I've made the suggested changes but that doesn't work well. As soon as I activate friendly urls in the cp all articles disappear from te frontpage (index.php) too.
#2595
Chris
Posted on 30 Jun 2010, 16:54:39

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Hmm seems friendly URLs may not be compatible with your current directory structure. For friendly URLs to work the URL needs to be formatted like so

http://example.com/something/1-0-title.html

Currently yours is something like

http://example.com/something/something/1-0.title.html

So unless you change the structure of your site to just have the one "/something" instead of 2 I don't think friendly URLs can be enabled without editing lots of code.
#2596
Chris
Posted on 30 Jun 2010, 17:30:20

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Actually, you can try this to see if friendly URLs then work. If you edit news/index.php, around line 81~ you'll see this code

Code:
if(FRIENDLY){
    if($_POST['ajax'] == "true"){
        if(!defined('ID')){ define('ID', $_POST['id']); }
    }else{
        if(!defined('ID')){ define('ID', $url['0']); }
    }
    $goto = $url['0'];
}else{


Change that to

Code:
if(FRIENDLY){
    if($_POST['ajax'] == "true"){
        if(!defined('ID')){ define('ID', $_POST['id']); }
    }else{
        if(!is_numeric($url['0'])){
            if(!defined('ID')){ define('ID', ''); }
        }else{
            if(!defined('ID')){ define('ID', $url['0']); }
        }
    }
    $goto = $url['0'];
}else{


Save then enable friendly URLs
#2597
1 2
Network-13.com © 2013