The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Automaticly post a new topic when blog has a new article

View previous topic View next topic Go down

Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 12th 2015, 3:00 pm

Hi Forumotion!
I'm here to ask something special:
A friend of mine own a wordpress blog.
In my forum, i create a new topic with the same content as him every time he post a new article.
I'd like to know if it is possible to create a new topic in my forum, with the same content as the article on the blog. A bit like a bot who will copy the article on the blog to a new topic in the forum.

What do you think? Is it doable?

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by _Twisted_Mods_ on February 12th 2015, 3:10 pm

as far as creating a bot that will do this even when your offline not gonna be posible... now i might be able to make something that will make it faster for you but i will need to url to the blog and your forum version

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 12th 2015, 3:15 pm

Hey! Thanks for the fast reply!

I don't want it to post as i am offline, but rather, as my friend is also the admin of my forum, when he post the message to the blog, the topic is created in the same time in the forum.
Here's the blog's link : the forum is in phpbb3.

Thanks again Smile

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by _Twisted_Mods_ on February 12th 2015, 3:40 pm

ok so i see a feed page http://frenchnerd.com/feed/ maybe we can have his feed page load into boxes and each box have a post button below it and you can scroll threw choose the ones you want and click the post button .. if this sounds good .. do you want it to get title from each blog or do you want to type your own title for each?

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 12th 2015, 3:50 pm

It seems like a great idea!
So the boxes with the post button will be only visible to my friend right?

If possible we'd like to have the title like this: [yyyy.mm.dd] + article.title
if it isn't, well, we could write it ourselves.

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by _Twisted_Mods_ on February 12th 2015, 4:07 pm

well the publish date is in the feed so i would be able to do that any info thats in the feed i can use ... .. only issue i see is there is html in these blogs so either the html would need to be converted to bbcode or you would have to enable html in the post .. and enable it on your forum if if its not already.. and also have every member enable it in there profile settings... if you choose to convert it .. it will take some time to write all the code and not everything can be converted ..so its up to you what you want to do .. either way this prob take about 3-5 days to complete

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 12th 2015, 4:15 pm

What we usually do for now is, copying the html code of the article, change it a little bit, and post-it in the topic. So we'll keep the html format, and the default option for html is enable.

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by _Twisted_Mods_ on February 12th 2015, 6:05 pm

awesome that will make it a lot easier
give me couple days ill see what i can come up with and i will keep you updated so you know i didn't forget about you

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 12th 2015, 6:15 pm

Thanks a lot for your help Smile

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by _Twisted_Mods_ on February 15th 2015, 5:04 am

well i tried multiple ways to do this and every way i tried failed on me so im sorry but i am unable to do this

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 18th 2015, 7:40 am

No probs! Thanks for trying!

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by JScript on February 18th 2015, 11:52 am

@WyvernNE
Let's see if I understand:
You want every time a topic in the blog is created, is also created a thread with the same content and title in another part of the forum.

For this to be possible, the member will have to have access to at least write in the sub-forum that you want the new thread is created!

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 18th 2015, 1:19 pm

Hi JScript and thanks for your reply!

In fact, the member in question is the admin of my forum, so its ok for the rights.

And yeah, every time a post on the blog is created, a new thread in the forum is created too.
One has told me it's possible with a PHP script. Something like a bot, but i'm not sure.
(the forum is on forumactif and the blog on wordpress)

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by JScript on February 18th 2015, 2:55 pm

@WyvernNE
So it's not in the same domain, in this case we have the problem of CORS (Cross-Origin Resource Sharing)!
Not to mention the fact that the member must be logged in the forum...

I made a function (other-based) that solves this problem with CORS, see:
Code:

/**
 * jQuery.ajaxCORS - Cross Domain Ajax - Version: RC1
 * Using: query.yahooapis.com, based on James Padolsey
 * Made and Optimizations by JScript - 2014/12/13
 **/
jQuery.ajaxCORS = (function(_cors) {
   var protocol = location.protocol,
      hostname = location.hostname,
      patt = RegExp(protocol + '//' + hostname),
      YQL = 'http' + (/^https/.test(protocol) ? 's' : '') + '://query.yahooapis.com/v1/public/yql?callback=?',
      query = 'select * from html where url="{URL}" and xpath="*"';

   function isExternal(url) {
      return !patt.test(url) && /:\/\//.test(url);
   }
   return function(Obj) {
      var url = Obj.url;

      if (/get/i.test(Obj.type) && !/json/i.test(Obj.dataType) && isExternal(url)) {
         // Manipulate options so that JSONP-x request is made to YQL
         Obj.url = YQL;
         Obj.dataType = 'json';
         Obj.data = {
            q: query.replace(
               '{URL}',
               url + (Obj.data ?
                  (/\?/.test(url) ? '&' : '?') + jQuery.param(Obj.data) : '')
            ),
            format: 'xml'
         };
         // Since it's a JSONP request, then complete === success
         if (!Obj.success && Obj.complete) {
            Obj.success = Obj.complete;
            delete Obj.complete;
         }
         Obj.success = (function(_success) {
            return function(data) {
               if (_success) {
                  // Fake XHR callback.
                  _success.call(this, {
                     responseText: (data.results[0] || '')
                        // YQL screws with tag <script>, then get rid of them...
                        .replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, '')
                  }, 'success');
               }
            };
         })(Obj.success);
      }
      return _cors.apply(this, arguments);
   };
})(jQuery.ajax);

But that would be the client side, which to log into the forum would not be safe!
It could all be done in PHP, which includes part of logged into the board...

But that would not be topic of Forumotion platform (I think!).

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by WyvernNE on February 18th 2015, 3:32 pm

Well, that's seem very complicated, but yeah, as we are no more on forumtion side, i can close the topic, thanks for your help!

WyvernNE
Forumember

Posts : 27
Reputation : 4
Language : French, english

http://foxtrottx3.forumgratuit.ch/

Back to top Go down

Re: Automaticly post a new topic when blog has a new article

Post by Derri on February 18th 2015, 3:51 pm

Topic Trashed upon authors request.


Forum Rules: :Forumotion Staff: :Appeal A Warning: :FAQ: :Tips & Tricks: :Forgotten Password/Login Issues
You need one post to send a PM
When your topic has been solved, ensure you mark the topic solved
Never post your email in public


Derri
Administrator
Administrator

Male Posts : 8385
Reputation : 576
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum