You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 Re: General support (1.2) » redirect in post.php » 2008-10-14 19:13:58
- eisbaer04
Hi,
I now got a working extension for that (working in Beta 1.3). As I think this can be an useful extension when integration flux to your homepage: Is there a proper way to provide this extension to others? Will the extension "checked" by development team?
eb4
#2 Re: General support (1.2) » redirect in post.php » 2008-09-21 11:46:31
- eisbaer04
Thanks for the link. I bookmarked it and will see, how I can extend this "redirect". But as I see there have to be a hook just before the "old" redirect in the core code?
#3 Re: General support (1.2) » redirect in post.php » 2008-09-20 08:19:37
- eisbaer04
No, in 1.3 you can achieve it using extensions which is much cleaner.
Ah, ok, thanks Reines. Is there a kind of "tutorial" how to write extensions?
#4 Re: General support (1.2) » default language in pun_user » 2008-09-02 20:41:21
- eisbaer04
Hi,
Thanks, but this is not the problem I run into! This is clear to me (but all in all it is a good idea to put it in the FAQ).
But please let me be more precisely ...
In "Administration -> Options" I set the default language to "German". To have German language on my account I need to set this in "Profile -> Essentials", of course. But we assume I now log out.
Visiting the board results in German language - as expected.
But carrying forward to fluxBB integration into my website:
On my site I need to know who currently visiting the site (for different purposes, beginning with getting authorization or name or so on. Therefore I extend my User class, called CurrentUser. In this I load a "normal" User, simply forward the $pun_user['id']. But as in the database record of the Guest user (id=1) the default language is still "English", I will retrieve the wrong language and need to fix it manually by setting Users language to $pun_user['language']. This is the thing I can't comprehend, why the default language is not updated in the guests database record as well - after all the guest user always have the default language.
For testing purposes I also changed the default style, there's the same behavior...
Database-fluxBB_users
(
[id] => 1
[group_id] => 3
[username] => Guest
...
[language] => English
[style] => Oxygen
...
)
$pun_user
(
[id] => 1
[group_id] => 3
[username] => Guest
...
[language] => German
[style] => Cobalt
...
)
Why there are these differences?
Thanks,
eb4
#5 Re: General support (1.2) » default language in pun_user » 2008-09-02 19:03:24
- eisbaer04
something to say on this topic?
#6 General support (1.2) » default language in pun_user » 2008-08-19 12:38:54
- eisbaer04
- Replies: 4
Hello Folks,
i have a question regarding the default language. If I change the default language, I get it when visiting board without login. It is "set" in $pun_user['language']. But it is not in the database record of guest user (but if I have e.g. default language "German", all Guests will have "German" language. So why this database record isn't updated when changing the default language? Why $pun_user['language'] is "loaded" from $pun_config['o_default_lang'] and not from the database record of current user (id=1).
I hope someone understand what I mean and has an answer for me?
PS: I need this, because I wrote a user wrapper class which loads the user from "punbb_users" (id = $pun_user['id']), there is the language selected, but it is "the wrong one".
thanks in advance,
eb4
#7 Re: General support (1.2) » login?action=out » 2008-08-17 17:45:23
- eisbaer04
Thanks, that works! ![]()
#8 Re: General support (1.2) » login?action=out » 2008-08-17 17:07:41
- eisbaer04
first thanks for the reply. I also have installed the FluxBB as a new installation (new folder, new database), but I don't have this token?
Where should I find it? in $pun_user? Or will this come automatically?
eb4
#9 General support (1.2) » login?action=out » 2008-08-17 15:46:53
- eisbaer04
- Replies: 9
Hi folks,
I recently upgraded from PunBB to FluxBB. Since then my logout does no more work.
On PunBB it was "enough" to link to
"/login.php?action=out&id=2". Now, with FluxBB this does not logout myself. I'm directed to the boards root. The logout link there is
"/login.php?action=out&id=2&csrf_token=40ce5abbaf76ba6fe66bb8a833eb9e8d4da5c273", so there was a csrf_token added to the url.
What is this token, how can I add this (where does I get this from)? Or is there an other way to provide a logout-link on my website?
I'm using FluxBB 1.2.20.
Thanks in advance.
eb4
#10 General support (1.2) » redirect in post.php » 2008-08-17 15:00:01
- eisbaer04
- Replies: 7
Hello there,
on my website I'm using latest release of FluxBB (1.2.20). The main goal beside the board functionality for me is the integration, so I can use $pun_user etc. on my site. This works all in all. In the login code I can set redirect_url to be automatically redirected to my start page. I also have code for posting messages on the website using FluxBB posting functionality, with the wish to be redirected to my own site.
<form method="post" action="fluxbb/post.php?tid=1">
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="form_user" value="eisbaer04" />
<input type="hidden" name="redirect_url" value="/myownsite.php?do=display#newest" />
<textarea name="req_message" rows="7" cols="75" tabindex="1"></textarea>
<input type="submit" name="submit" tabindex="2" value="Send"/>
</form>When I submit, the posting is posted to the board, but unfortunately the redirect does not work. So I changed the post.php in FluxBB.
###FILE post.php
<<<<< OUT
redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']);
>>>>> OUT
<<<<< IN
if( isset( $_REQUEST['redirect_url']))
{
redirect(htmlspecialchars($_REQUEST['redirect_url']), $lang_post['Post redirect']);
}
else
{
redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']);
}
>>>>> INNow, I will be redirected to the my page after posting. This works exactly as I expected.
If someone else keeps his code - so no redirect url given - the redirect is as before (same for posting directly from within the board). But for me this code is a better possibility for integration into own sites, which is for me one big feature of FluxBB.
Is this the proper way? Are there objections? Would this be helpful for others, too? Would this code find its way to FluxBB source? Is there a way not to update post.php always after updating FluxBB?
eb4
Pages: 1
