81
kjs222
Re: Notifications Not Working... Where to Start?
  • 2003/11/1 22:11

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


None of the modules; and the link mentioned above didn't solve it either... I can't even find my notifications block in the blocks admin... I'm thinking something might be wrong ;).

I'll take a further look at files, if anyone has more ideas let me know,

Thanks,
Keith



82
kjs222
Re: Register to Post Redirect and checklogin.php
  • 2003/11/1 21:23

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


Quote:

why you are defining the "topic Id" url...?


The topic_id is important because that's the topic that the user is browsing when they click on "register to post". So, for this post, if you simply navigate to this post, you'll have the url:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=13376&forum=20

To test the exact problem, [first, you must not be logged-in] and then from the link above, click "register to post".

After going through the login procedure at that "register to post" page, you will find yourself being redirected to the following address:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=13376

So, it keeps the topic you were in, but because part of the string is after an "&", it doesn't include the forum... the result is an error message, "no forum selected", and then a redirection to the forum index (which is not the post you were previously navigating).

Hope that clarifies,

Thanks,
Keith



83
kjs222
Re: Notifications Not Working... Where to Start?
  • 2003/11/1 14:41

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


By the way, I have the notifications options enabled on my forum admin, and also have the one-liner at the bottom of my templates (for instance, in viewforum; <{include file='db:system_notification_select.html'}> )

Thanks,
Keith



84
kjs222
Notifications Not Working... Where to Start?
  • 2003/11/1 14:37

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


Good Morning,

My problem is that notifications are apparently not working throughout my entire site; particularly, none of the inline notifications show-up at all. I'm wondering where I can start for trouble-shooting this, since I have looked through the files I think are related and found nothing that appears off-track.

Thanks,
Keith



85
kjs222
Re: Register to Post Redirect and checklogin.php
  • 2003/11/1 13:46

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


I just checked, the problem occurs in this site [xoops.org] too. So then that means it's almost garunteed to be a problem where the '&' is being interpretted as a new var... I'm not great with php internals...


Ohh, just remembered this has as much to do with user.php as with checklogin.php... here's the code that's rendered in the form on user.php:

notecouldn't figure out how to render this properly: [& amp;] (no spaces)... hopefully you can figure it out.
<input type="hidden" name="xoops_redirect" value="/user.php?xoops_redirect=/modules/newbb/viewtopic.php?topic_id=147[& amp;]forum=1[& amp;]jump=1" />
</form>


So... the problem seems to be interpretting " & a m p ; " as an & in the checklogin.php

Well, that's enough for me for the moment... I'm really not great at php, so I hope one of you pros will come along and hammer this out in a couple seconds.

Thanks so much,
Keith



86
kjs222
Register to Post Redirect and checklogin.php
  • 2003/11/1 13:33

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


I looked through a number of other posts and can't find one that seems to address this problem.

Scenerio:
1. User comes to site
2. User browses to topic
3. User wants to post, so presses register to post.
4. User is directed to login page, URL =
XOOPSURL/user.php?xoops_redirect=/modules/newbb/viewtopic.php?topic_id=167&forum=38
5. User logs in correctly.
6. User is redirected to an incorrect URL (note, forum= is missing):
XOOPSURL/modules/newbb/viewtopic.php?topic_id=167
7. Instead of being directed to the correct topic (since the forumID is not there), I am directed to main forum page.

I have a feeling that it doesn't like having a "&" as part of the redirect URL (treats it as a new var).

My problem is that even though I'm running 2.0.3, I'm not sure if the problem is fixed in 2.0.5 (I've got CVS latest version of the following checklogin lines):

checklogin.php lines 65-85

    
if (!empty($HTTP_POST_VARS['xoops_redirect']) && !strpos($HTTP_POST_VARS['xoops_redirect'], 'register')) {
        
$parsed parse_url(XOOPS_URL);
        
$url = isset($parsed['scheme']) ? $parsed['scheme'].'://' 'http://';
        if (isset(
$parsed['host'])) {
            
$url .= isset($parsed['port']) ?$parsed['host'].':'.$parsed['port'].trim($HTTP_POST_VARS['xoops_redirect']): $parsed['host'].trim($HTTP_POST_VARS['xoops_redirect']);
        } else {
            
$url xoops_getenv('HTTP_HOST').trim($HTTP_POST_VARS['xoops_redirect']);
        }
    } else {
        
$url XOOPS_URL.'/index.php';
    }


So then, if my checklogin script is up-to-date; has this been fixed somewhere else? (possibly on some forum file?)

Hope this makes sense,
thanks,
Keith



87
kjs222
Re: Forum Not Selected
  • 2003/11/1 12:55

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


Sorry, post didn't render correctly... also fixed problem.

Cheers,
Keith



88
kjs222
Re: [If User is Moderator] ... SOLUTION
  • 2003/11/1 11:47

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


Thanks to everyone who lent a hand, I ended up having my programmer piece together the bits on this thread. For anyone who is interested, this is how you do it:

So in the template file u will have :
<{if $moderator == true}>
           <
p>blah blah</p>
               <{/if}>

and in the php file newbb/viewtopic.php (I put it around 1/3rd of the way down):


if ( $xoopsUser ) {
   if ( 
$xoopsUser->isAdmin($xoopsModule->mid()) ||
is_moderator($forum$xoopsUser->getVar('uid')) ) {  
        
$xoopsTpl->assign('moderator'true);
   }
  }





89
kjs222
Re: [If User is Moderator] ...
  • 2003/10/29 15:17

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


Sorry, and can I use that in a template, or not? (if so, how)?



90
kjs222
Re: [If User is Moderator] ...
  • 2003/10/29 15:09

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


merci!




TopTop
« 1 ... 6 7 8 (9) 10 11 »



Login

Who's Online

133 user(s) are online (93 user(s) are browsing Support Forums)


Members: 0


Guests: 133


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits