Not logged in. · Lost password · Register
Forum: Customising UNB Modifications and plug-ins RSS
Link between my blog and unb
ZORGLUB #1
Member since Mar 2006 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Link between my blog and unb
Hi folks,

i've just installed unb on my host, and i've got an idea that could be great for me.. but i need help for that :D

at present, when i add a post in my blog (dotclear), i add a post too in my unb board, and i put the url of my blog's post. then, i add the url of my fboard's post in thee blog's post...
mhh am i clear??

my goal is to have a real plae to chat about the blog's post, and not only the comment part.

but don't want to forget a post and i want to simplify that process

do you think it could be possible to add a code in my dotclear interface, that adds a post in the board with a defined structure and links  in both post (board and blog)

thanks for any kind of help !
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Sure is that possible. You need to include the UNB files in the blog pages (just like in any other page) and then find the place where a new blog article is stored, to add the UNB API calls to create a new thread there, too.

Another solution would be to use UNB as your blog, if you want such a tight integration anyway. A blog isn't much different from a very simple forum. You could create/use another UNB design that looks more like a news page then.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
ZORGLUB #3
Member since Mar 2006 · 5 posts
Group memberships: Members
Show profile · Link to this post
in fact, i need to know first if it is possible to have a php code external to unb that create a new thread, like the function add()
i thought i could add this php code in my blog's process.
but i don't have the level to code this thing, is there a way to do this? a php code that would create a thread with a predefined structure?
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You need to code it yourself, if nobody has it ready for you. The steps are following:
  • Include the UNB common lib file into your blog's PHP file
  • Call the UNB API function to add a new thread
  • Call the UNB API function to add a new post to this thread
You can freely define how the posts should look like. I don't know if there are some close examples somewhere available now.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
ZORGLUB #5
Member since Mar 2006 · 5 posts
Group memberships: Members
Show profile · Link to this post
Merci Yves,

i'll try to check that, if i get stuck , i ll come back :D
Pompei2 #6
Member since Mar 2010 · 17 posts
Group memberships: Members
Show profile · Link to this post
Hi,

I'm trying to achieve exactly that and I get a warning at the first point: including common.lib.php from within my blog. The unb board is located in a subdirectory called "luc/unb2". Thus in my blog's php file, I do:
  1. define('UNB_RUNNING', 1);
  2.  
  3. $UNB = array();
  4. $UNB['LibraryPath'] = dirname(__FILE__) . '/luc/unb2/unb_lib/';
  5. $UNB['RelativeRoot'] = dirname(__FILE__) . '/luc/unb2/';
  6.  
  7. require_once(dirname(__FILE__) . '/luc/unb2/unb_lib/common.lib.php');

I get this line in my php logfile:
PHP Warning:  fopen(unb_lib/logs/ip.log): failed to open stream: No such file or directory in xxxx/luc/unb2/unb_lib/common.lib.php on line 3243

I think the reason comes from common.lib.php reading-in the conf file, then it replaces $UNB['LibraryPath'] with the value read from the conf file, that obviously doesn't fit the one I set in my blog's php file. Why does it do that?
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 190.6 ms (103 ms) · 70 database queries in 137.6 ms
Current time: 2012-02-07, 20:34:50 (UTC +01:00)