31
Coplan
ModDev: PHPSESSID in URL
  • 2004/4/6 15:50

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I'm working on a module for XOOPS that is made to track production releases. The content is not really the issue. The issue is that whenever I click on a link within my module, I get redirected to the new URL. Everything works fine and all, but I am getting the PHP session ID automatically appended to the URL, like this:

Quote:

http://www.scenespot.org/modules/tunetracker/edit.php?do=1&PHPSESSID=alksjdoi8asdflkwerj


I don't specifically call for that in my script. But even the link seems to be pointing to that address. I don't know how it gets in there.

What should I look for to figure out how to hide this in the URL? Perhaps there is a specific XOOPS way of creating links?

For an example, I have a beta up on one of my sites: dev.scenespot.org. Go to the tune tracker (in the menu) and click on any song link in that module.

Any help would be appreciated.




32
Coplan
Re: Module messing up Anonymous menu
  • 2003/10/31 17:57

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


Correct. The only differences between the two pages is the fact that the messed up one has the menu option for my module in it, while the other does not.

So I did some comparison between the two pages and found nothing different between the two.

I think it might have something to do with my apache configuration on my home computer. The main website doesn't seem to have this problem. But only on my home computer. I just discovered that I can't view user profiles on my home computer either. So I'm going to trouble-shoot some unrelated issues on that machine.



33
Coplan
Module messing up Anonymous menu
  • 2003/10/30 5:21

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I am having a really wierd problem with a module I'm writing.

With the module loaded and a user is logged in, everything is fine for everyone (admin & registered users)

With the module loaded and user is not logged in (anonymous), the menus get all sorts of messed up regardless of what module I'm using, and regardless of what blocks I have loaded (of course the menu is loaded)

When I unload the module, everything is fine again for everyone (admin & registered users).

Now here's the really wierd part: I load the module again, I go to the control panels and disable module access for anonymous users. I submit those changes and log out (so I can test anonymous), and low and behold -- everything is perfect again as if there was no problem at all.

The menu structure is no different than any other menu. I have a couple of options set forth in the xoops_version.php file. If I disable all the menus for that module, it still acts all messed up. Otherwise, I dont' see why this module should affect the site so like any other module.

I'd love to paste some code here for review, but I don't even know where to begin. Has anyone else ever experienced this wierd behavior? I could use some advice.

Or I could at least use some advice as to where to begin trouble shooting.


Thanks.



34
Coplan
Re: Posting in forum does not show forum name
  • 2003/10/28 14:48

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


No comments?



35
Coplan
Posting in forum does not show forum name
  • 2003/10/27 14:18

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


This is not so much of a bug report as it is a feature request.

I'm using the standard newbb module for my forums. And some of the users have mentioned that with they hit the New Topic button and begin writing their post (much as I am right now), there is no mention of what forum I'm posting in anywhere.

Shouldn't it say the name of the forum at the top or something? Otherwise, how would I know its going to the right place?



36
Coplan
Re: Slashes in my form preview
  • 2003/10/27 6:24

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I somehow stumbled upon my own solution.

As it turns out, on my server, the php.ini has magic_quotes_gpc enabled. I can simply turn them off, but a better solution (assuming portability) would be to create a new function such as this (taken straight from the bird book):

Quote:

function raw_param($in) {
return ini_get('magic_quotes_gpc') ? stripslashes($in)
: $in;
}



Then call the function in this way:
Quote:

$stored = raw_param($_GET['name']);
// $stored is now an exact copy of the user's input


I only have one more problem. There now seems to be spaces popping up before and after the description. Still trying to figure that one out.



37
Coplan
Slashes in my form preview
  • 2003/10/27 4:43

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I'm writing a module that allows users to submit descriptions about files they are submitting. It's a song database, but that's not really important.

I'm using a form to submit the data. The user might enter a description, but when they preview the description, it contains extra spaces at the beginning. IN addition, some special characters (like ', \) are prefixed with a "\".

I realize this is more of a PHP question, but I've never noticed this behavior outside of xoops. Does anyone know why that might be happening, or how I can fix it? I'm using the Post method, and here are tidbits of code:

Quote:

// Harvest some of the data provided via POST (if applicable)
$songInfo = array('s_name' => $_POST['s_name'],
'genre_id' => $_POST['genre_id'],
'uname' => $cur_uname,
'user_id' => $cur_uid,
'user_id2' => $_POST['user_id2'],
's_url' => $_POST['s_url'],
's_url2' => $_POST['s_url2'],
's_url3' => $_POST['s_url3'],
'stype_id' => $_POST['stype_id'],
'stype_id2' => $_POST['stype_id2'],
'stype_id3' => $_POST['stype_id3'],
's_desc' => $_POST['s_desc'],
);


Quote:

<table>
<tr>
<td valign="top"><b>Comments:</b></td>
<td>$songInfo[s_desc]</td>
</tr>
</table>


In this case, if I submit:
Quote:

I'm Testing Something.


I get:
Quote:

I\'m Testing Something.

[/quote]



38
Coplan
Re: Check for Module Admin
  • 2003/10/24 15:08

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


Does the isAdmin() function check the xoops_version script so that it knows what module its in? IN other words, does it automatically know that since its in Script X that it must be a part of module X?



39
Coplan
Check for Module Admin
  • 2003/10/23 17:21

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


This is a very simple question. I'm writing a module for XOOPS 2.0.x, and I want to start working on the administrative side of things. I want certain links (like edit entry) to appear only if the person has admin rights for that module.

How do I test if a person has admin rights for a given module? I know it's probably a simple class or function that's already defined somewhere.

(I believe this has nothing to do with the module permissions post that was at the top of this forum. I read that, and I don't see that as the same thing)

Thanks,



40
Coplan
Zip Code Centric Search
  • 2003/10/15 22:19

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


Is anyone aware of a zip-code centric user search module or hack? I guess I need to be a bit more specific?

I run a site with focus around a large community, world wide. I want people to be able to search for each other based on zip codes (in the US...i'm not familiar with similar searches in Europe/Asia, etc). Anyhow...I'd like members to enter their zip code in the user profile area (I imagine that would have to be hacked in?) and then a module that would search through the zip codes and display all the members within a given range of zip codes.

I code PHP, so I can code such an app if I knew where to start. The biggest feat for me at the moment is figuring out how to hack in the zip code entry system into the user profile without breaking my XOOPS engine.





TopTop
« 1 2 3 (4) 5 »



Login

Who's Online

262 user(s) are online (167 user(s) are browsing Support Forums)


Members: 0


Guests: 262


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