Jump to content

Chris89

Members
  • Posts

    55
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by Chris89

  1. Some PHP.INI settings on cookies in case it can help anyone to get any more info
  2. I've got my forum setup on a subdomain of "forums" and I've got my main site integrated with IPS. It all works locally, but when I've gone to do it for real, the cookie from the forum is not setting accross the whole domain. Does anyone have any idea how to achieve this? I've added this to my constants.php file, but it's not recognising it off the forums subdomain: <?php define( 'COOKIE_DOMAIN', '.strongholdnation.co.uk' ); define( 'COOKIE_PREFIX', '' ); define( 'COOKIE_PATH', '/' ); P.S. Both parts are using SSL also.
  3. Ok... I'm working on an external script. I need to display my user groups along with their names, which I have seen isdone in places such as the advanced search page. But I don't seem to be able to get this working- whenever I'm trying to output the group names, it's returning what looks like MD5 hashes which change on each page load. For example: 6efe1e7a1c78652b76c5ae3be94f2441 c3ff10a9a6cfec708bc6abbcce6cba94 9ae79d66153d33e93498247b0e55ea90 OR: 2d893a957ef41a6f29eaac3944277d42 a257a8f400105af97e1412a642011c28 1f2b589f7e76427d0f3552ff45c54031 The following code is what I'm using. The result below that is what I'm getting when I print_r() the $group variable. <?php require 'init.php'; \IPS\Dispatcher\External::i(); $groups = \IPS\Member\Group::groups(TRUE, FALSE, FALSE); foreach ($groups as $group) { print_r($group); //echo $group->get_name().'<br>'; } IPS\Member\Group Object ( [_data:protected] => Array ( [g_id] => 4 [g_view_board] => 1 [g_mem_info] => 1 [g_use_search] => 1 [g_edit_profile] => 1 [g_edit_posts] => 1 [g_delete_own_posts] => 1 [g_use_pm] => 1 [g_append_edit] => 1 [g_access_offline] => 1 [g_avoid_q] => 1 [g_avoid_flood] => 1 [g_icon] => monthly_2020_06/admin.png.a9e087291c4fe72c681322d378b57531.png [g_attach_max] => 500000 [prefix] => <span style='color:#ff0000'> [suffix] => </span> [g_max_messages] => -1 [g_max_mass_pm] => -1 [g_search_flood] => 0 [g_edit_cutoff] => 5 [g_photo_max_vars] => 500:170:170 [g_dohtml] => 0 [g_bypass_badwords] => 1 [g_can_msg_attach] => 1 [g_attach_per_post] => 50000 [g_dname_changes] => -1 [g_dname_date] => 0 [g_mod_preview] => 0 [g_rep_max_positive] => 100 [g_rep_max_negative] => 100 [g_signature_limits] => 0::::: [g_hide_online_list] => 0 [g_bitoptions] => 26148875 [g_pm_perday] => -1 [g_mod_post_unit] => 5 [g_ppd_limit] => 500 [g_ppd_unit] => 5 [g_displayname_unit] => 0 [g_sig_unit] => 5 [g_pm_flood_mins] => -1 [g_max_bgimg_upload] => -1 [g_post_polls] => 1 [g_vote_polls] => 1 [g_topic_rate_setting] => 0 [g_bitoptions2] => 24 [g_upload_animated_photos] => 1 [g_view_displaynamehistory] => 1 [g_hide_own_posts] => 1 [g_lock_unlock_own] => 1 [g_can_report] => 1 [g_create_clubs] => public,open,closed,private [g_club_allowed_nodes] => * [g_promote_exclude] => 1 [g_close_polls] => 0 [g_club_limit] => [g_pmviewer_protectedgroup] => 0 [g_pmviewer_viewhidden] => 0 [g_pmviewer_hideunhide] => 0 [g_pmviewer_managemembers] => 0 [g_pmviewer_editposts] => 0 ) [_new:protected] => [changed] => Array ( ) [skipCloneDuplication] => ) Does anyone know what's going wrong here? I genuinely have no idea why text is being replaced by these hashes.
  4. Thanks for your reply but as I'm integrating my site with IPS, I'm going to need to integrate the exact same editor that IPS uses, i.e. configured in exactly the same way, essentially included from the forums including any processing which it does.
  5. I'd like to be able to use the IPS Editor on my own site, where I have several textareas etc. But I've spent a very long time looking and I simply can't find the code for it anywhere in any of the files. The most I've been able to find is including the CKEditor javascript fo it to work, @ applications/core/interface/ckeditor/ckeditor/ckeditor.js. I've checked in templates, PHP files, all sorts. I just can't find it. I know it needs to be customised so I expect in some way I'll need to run a PHP file in order to get the editor working. Can anyone point me in the right direction as to where I should be looking?
  6. I've managed to fix the problem with the if statements always triggering. Turns out it was a template error (I'm using Twig) so this is triggering fine now. However, I have included a custom login form on the sidebar of my site, which I'd like to integrate with IPS.... I've so far managed to get it to post the login data to the IPS login page and it will succesfully log the user in. Although when it comes to the redirect, it's redirecting back to the forum, rather than my site. I've included the 'ref' query string argument with a base64 encoded URL of where the user currently is on my site. This is used as follows: \IPS\Http\Url::internal('app=core&module=system&controller=login', 'front', 'login')->setQueryString('ref', base64_encode(\IPS\Request::i()->url())); I've taken a look at the IPS code to see why this might be the case, and I've noticed this particular block in the 'manage' method of the login page: if ( $success = $login->authenticate() ) { if ( $ref and $ref = @base64_decode( $ref ) ) { try { $ref = \IPS\Http\Url::createFromString( $ref ); if ( !( $ref instanceof \IPS\Http\Url\Internal ) or $ref->base !== 'front' or $ref->openRedirect() ) { throw new \Exception; } } catch ( \Exception $e ) { $ref = \IPS\Http\Url::internal(''); } } else { $ref = \IPS\Http\Url::internal(''); } if ( $success->mfa() ) { $_SESSION['processing2FA'] = array( 'memberId' => $success->member->member_id, 'anonymous' => $success->anonymous, 'remember' => $success->rememberMe, 'destination' => (string) $ref, 'handler' => $success->handler->id ); \IPS\Output::i()->redirect( $ref->setQueryString( '_mfaLogin', 1 ) ); } $success->process(); \IPS\Output::i()->redirect( $ref->setQueryString( '_fromLogin', 1 ) ); } The way I read this, it's trying to get my URL but only seems to want to work if it's an internal URL. It's triggering the exception, & then setting the URL back to the default all of the time. Now I'm not denying there are security issues involved here, but is it actually possible to redirect back to my own site after login/logout?
  7. Thanks guys for all your help. For some incredibly bizarre reason, I managed to get it working again. I have no idea how, I started in a fresh file, with exactly the same code and it worked. The reason I'm using app is because I use an MVC setup on my own site, and app is one of the parameters I use as well. I just wanted to make sure I could get something from it. I've started my integration and I've gotten myself to a point where I need to check if a user is a guest or not..... I'm checking like this: if (\IPS\Member::loggedIn()->member_id) { $links['profile'] = \IPS\Member::loggedIn()->url(); if (!\IPS\Member::loggedIn()->members_disable_pm) $links['inbox'] = \IPS\Http\Url::internal('app=core&module=messaging&controller=messenger', 'front', 'messaging'); $links['logout'] = \IPS\Http\Url::internal('app=core&module=system&controller=login&do=logout', 'front', 'logout')->csrf(); } else { $links['login'] = \IPS\Http\Url::internal('app=core&module=system&controller=login', 'front', 'login'); $links['register'] = \IPS\Http\Url::internal('app=core&module=system&controller=register', 'front', 'register'); } There are two things I've noticed from this- the first and most important one, is that regardless of whether the user is a guest or not, it's always triggering the first condition. I've checked both output and when I'm logged in the 'member_id' of the user returns 1, and when I'm not it returns null. I've even tried reversing the condition to check if they ARE a guest, but it's still happening. I have no idea why this is happening, but I can only assume I'm missing code somehow. This also follows some weird glitchy behaviour where if I visit my site before I visit my forum (and I'm logged in), then the site doesn't necessarily always detect I'm logged in unless I go to the forum first. This isn't always the case but does happen sometimes. It makes me wonder whether there's some kind of code for updating the online list or something that I'm missing. I would also have actually done a full check on the PM link to make sure that uers could use that application as well, but it won't let me saying that it's not a subclass of Dispatcher. That's not really a big deal in the grand scheme of things as I've just missed that part of the condition out, but it is an error that keeps coming back on different things. Also thanks for the tip about the IPS Cookie settings @jesuralem - I think that will come in useful.
  8. Thanks for your reply. I honestly have no idea why this is happening but it's also happening with other things, such as when I try to request data using methods such as this: \IPS\Request::i()->app Even when I use an 'app' query string in the URL, it's returning NULL when I var_dump it. Yet other methods, such as when I try getting the current URL (\IPS\Request::i()->url()) actually bring back a result. Confusing is an understatement. Clearly IPS aren't going to help me so I'll try for a little longer and if I still can't get anywhere I think I'll just give up on it all. Thank you for your help.
  9. When I do this for real, my site will be on the domain and my forum will be under the subdomain. But at the moment I'm running both locally, so yeah they're both on the same domain.
  10. So I managed to get this working yesterday, but I returned today and it's throwing the same error that I originally got. Every time I load the page I'm getting a load of different numbers which looks like some kind of hash, probably a session ID. It changes on every page load. This is an example: 010e622493ff272b02e786c86ba7c990 This is the code I'm using, virtually exactly as it is in the docs: <?php define('IPS_ROOT', __DIR__.'/include/subdomains/community/'); require IPS_ROOT.'init.php'; \IPS\Session\Front::i(); echo \IPS\Member::loggedIn()->name; For some reason it seems to think I'm a guest, even though I AM logged in on the forum. I've even refreshed the page in the forum to make sure the session is still valid, but it's showing me the same result. Any idea why this might be happening?
  11. This is a continuation of this topic: What I'd like to do here is integrate the authentication from IPB to my own website, so that i.e. when a user logs into my IPB forum they are also logged in on my own site... so that I can display things on my own website depending on whether they are a guest/logged in user, admin, etc. for example. This isn't login forms on my site, but integrating the whole website with IPB. I was initially told that in my above topic I could include the init.php page and this would allow me to use the framework, but I contacted support who at first wouldn't even speak to me unless I renewed my license, so I renewed my license to get the help I needed and they basically threw it back in my face saying they couldn't (or wouldn't) help me. All I want to be able to do is be able to extend the functionality of the forum to work on my website as well. I've taken a look in the developer section and there's virtually nothing in it other than creating new plugins or apps for the forum. I doubt I'm the first person who is having this issue, I'd be grateful if someone could point me in the right direction. I'm not asking anyone to do anything for me, just first of all, whether what I'm wanting to do is actually possible so I don't waste more time/money on this if it isn't, & secondly maybe point me in the right direction a bit as to how to include & use IPB functions etc on my own pages. Thank you
  12. Thanks for your reply. Great to hear I can integrate it externally. Regarding the "Protected Forums" feature..... what I want is a forum where: Everyone including Guests can view the forum, but only moderators for that forum, or users who created their topics, can view topics in that forum No last post information about that forum is shown on the index page (i.e. "Protected Forum" is shown instead of the poster and last topic) In IPB 3 This was accomplished using a few different settings, for instance 'Hide Last Post Info' and 'Allow posters to view other member's topics' but in IPB 4 I can only find 'Users can see topics posted by other users?' and no equivalent of hiding the last post info on the forum index. Also in IPB 4 when I do enable this setting, for some reason when I try to set the forum read permissions, the read forum permission for Guests is disabled, and greyed out as well so I can't allow them to view that forum. For some of the other things...... I might not just be able to find these things, but these are some of the things I've noticed: There doesn't seem to be a "members" page in IPB 4 or any way for users to browse the member list which there was in IPB 3 When viewing a topic/forum you can't see who else is viewing that topic/forum anymore I can't find any way to allow access by a custom user group to the Admin CP (and the same for the Mod CP). I know it exists, I just can't find the settings for it anywhere Is there any way to unapprove content to the Mod CP from the main board as well? i.e. you view a topic/post and can unapprove it back to the approval queue be reapproved again. Probably just a case of CSS changes too, but in IPB 3 when you viewed an announcement it appeared like a regular topic, i.e. you'd have the user's details along the left and the announcement like a regular post on the right. Is this possible in IPB 4? I also need some user groups who can moderate everywhere and other groups who only moderate certain forums. I only want Moderators to have permissions in the forums they moderate, i.e. they can't pin even their own thread in a forum where they don't have moderator permissions Is there any way to display on the forum index which Moderators (or Moderator groups) moderate which forums? Is it possible for you to allow/disallow users to post links based on which user group they're in? I'd like people to be able to post things without the security issues of HTML....... is bbcode allowed or possible? Finally, a few more things: On my current forum, I'm using a mod that allows users to choose an avatar from a list of images selected by the board administrator, rather than upload a one. Is something like this possible in IPB? Favicon settings: I usually use Real Favicon Generator, is this something that can be used or any way to use favicons? Site CDN: At the moment, I use a subdomain on my site for all static content on my forum (i.e, avatars, JS files) ., which I cache with CloudFlare. Will this kind of functionality be possible or will I have to drop CloudFlare and/or my CDN completely? I appreciate this is a very long list of questions, so thank you very much for your time! ** Edit ** Is there any documentation .etc. I can look at to help me get member variables, group information, etc into my own code? I've looked but I can't really find much
  13. For some reason I don't seem to be able to post in virtually any forum anymore, so I'm going to post here instead even though it's not 100% relevant.... I already have one copy of Invision Community. I'd like to get a second copy, or potentially even transfer my first over to a different website and use it there instead. However, before I do so I need to know some things. Currently, my own site is using an MVC setup very similar structurally to that of IPB 3, and my current forum is deeply integrated in with my website, including authentication. I need to know if it's possible to integrate IPS 4 with my own website, so that I can run the code, for example using user authentication from IPB on my own website. What I guess I'm asking is, is it possible for my to initialise IPB to run on my own website so I can use functions, classes etc on my own website & integrate the two together? If so, what would I need to do for this to be possible? My forum currently is using a heavily modified version of FluxBB, which is a fork of PunBB. I see you support PunBB on your converter, but not FluxBB. Is it possible I could write some code using the converter to convert my data myself to IPB? Also, a lot of the features of IPB 3 seem to have gone.. such as the "protected forums". I took a look at the new version but it seems that the closest thing I can find is "Users can see topics posted by other users?" and "Users without read permission can open forum? ". For some bizarre reason it blocks me from allowing guests to view the forum then and then I can't change this. Got a couple more things but hopefully someone can help with these first :)
  14. Thanks for your reply. Yes, all configured with my API key..... there’s nothing at all logged in the ACP and in Mailchimp it appears to say the request was successful even though nothing is happening. It’s not even updating the “last changed” field on my list of a row exists. its extremely confusing.
  15. No nothing, it’s just not syncing the list of doing anything. No errors at all. I tried registering a new account and that didn’t do anything either. *edit* obviously normal functionality still works. It’s just the plugin that doesn’t.
  16. Not working for me on the latest version of IPB. Any suggestions on what I can do?
×
×
  • Create New...