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 Tutorials How to post news articles using Microsoft Word
Chris
Posted on 28 Jul 2012, 10:03:29

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

Editing an existing article

I discovered recently when playing with the latest version of Microsoft Office 2013 that it had a template called Blog post which apparently allows you to post news articles directly to popular blog software. After a bit of investigating I decided I could write a script to allow articles to be posted directly to any N-13 News installation.

1 - To add this functionality to your existing N-13 News installation, download the following file

http://n-13news.googlecode.com/files/n13news4.0.2_xmlapi.zip

Extract the 4 files and copy them to your server into the same directory you installed N-13 News.

2 - Edit the xmlapi.php file, towards the top of the file are a few settings, edit these to match your own server settings.

/* EDIT THESE SETTINGS \*/

$apiSettings = array();
$apiSettings['blogURL']     = 'http://dev.network-13.com/news'; // Change this to the location where you show your news
$apiSettings['blogName']    = 'Network-13'; // Name of your blog/site

/* ~~~~~~~~~~~~~~~~~~~ */

3 - Now you just need to configure Microsoft Word

These instructions apply for Microsoft Word 2007 and above. To open the Blog post template, navigate to File > New > and find the Blog post template. Once you've opened it it may ask you to add new account, if it doesn't, select the Manage Accounts option.

Select New, where it says select your blog provider, select Other, you should be given a screen like this

Account Settings

For the Blog URL enter the location of the xmlapi.php file, for example http://example.com/news/xmlapi.php

The username and password is the same username and password you use to login to N-13 News. Once you add the account, hopefully that should be all that's required. Now you should be able to open existing articles on your server and publish new ones.

Existing articles

Many thanks to Ryan Hemelaar who wrote the basis of the code I built on top of.

#3914
Last edited by Chris at 2012-12-26 08:35:45 Reason: .
BaDTaG
Posted on 28 Jul 2012, 13:20:56

Access: Member
Total Posts: 5
Joined: 2012-07-26

Nice work m8

but i just tryd to open a post i made and the images dont show. if i use images in word for a new articel wil the pic show?

well i guess i can test that..

EDIT: okay images dont work and danish nativ letters dont work æøå givs me this ���

#3915
Last edited by BaDTaG at 2012-07-28 13:30:33 Reason: info
Chris
Posted on 28 Jul 2012, 14:54:17

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

Images should work provided you change the $apiSettings['uploadDir'] = 'D:\www\blog\uploads\\' directory to your news upload directory and have chmod'd that directory to 777.

Getting the same problem with the characters turning into ���, will see if I can figure out what's causing it.

#3916
Last edited by Chris at 2012-07-28 14:54:27 Reason: .
Chris
Posted on 28 Jul 2012, 15:05:46

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

Alright I think I fixed the weird character issues, if you redownload the zip and upload a new copy of xmlrpc.inc, this should hopefully make non-english characters display correctly.

#3917
BaDTaG
Posted on 29 Jul 2012, 00:24:22

Access: Member
Total Posts: 5
Joined: 2012-07-26

thanks m8 the æøå is working now. now it is just the right path to the upload folder. i am not shure ware i sould start it from. /home/www/edb-hosting.dk/nyt/upload like this? or /www/edb-hosting.dk/nyt/upload this. or like /edb-hosting.dk/nyt/upload.

but ill play around whit it wen i have the time. still developing the local sites of .com whit a new design. .net and .dk site i using the same database indstalation as a test. hope it dos not course problems :-/ it seams to work fine for now

edb-hosting.dk/blog.html edb-hosting.net/blog.html

EDIT: okay i tryd some difrent settings and got a broke image icon. the link it gave me was http://dev.network-13.com/blog/uploads/728122343test1.jpg ??????? i dont get it

okay in xmlapi.php on line 280 i changed http://dev.network-13.com/blog/uploads/ to http://edb-hosting.dk/nyt/uploads/

now the broken images show the right link but still no images and upload folder is empty and permissions is set to 777

#3918
Last edited by BaDTaG at 2012-07-29 00:54:57 Reason: info
Chris
Posted on 30 Jul 2012, 02:38:59

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

I've made some changes to the xmlapi.php file, some of the settings don't need to be edited manually now, instead the script pulls the systems from the news system, hopefully this will fix whatever problem seems to be happening with the images not being uploaded properly. If you re-download the zip from the first post and replace your own copy of xmlapi.php with the latest one and change the settings at the top, try again to see if images now upload.

#3921
BaDTaG
Posted on 12 Aug 2012, 10:22:44

Access: Member
Total Posts: 5
Joined: 2012-07-26

Hi sorry for the late reply

it seams to upload the images now. but it still dos not show them.

but it seams also to be better to just use the normal way to post storys. the layout is not as good when using word

#3934
londonfinal
Posted on 26 Dec 2012, 08:35:45

Access: Member
Total Posts: 4
Joined: 2012-12-26

How add summary in Microsoft Word?

#3995
Network-13.com © 2013