71
zer0fill
Re: Xoops parsing our session objects?
  • 2004/1/2 8:46

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


W0000H0000!!!!

this was a lot easier than i thought

find file: kernel/session.php line ~117
function write($sess_id$sess_data)
{

add the line after open brace
function write($sess_id$sess_data)
{
  
$sess_data addslashes($sess_data);


you do NOT need to add stripslashes() in the reader

now it's time for sleep

the fix has been reported in the bugs forum.



72
zer0fill
Re: Who let the Mascot out?
  • 2004/1/2 8:22

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


i like Xoopy ROAR!



73
zer0fill
Re: Xoops parsing our session objects?
  • 2004/1/2 8:04

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


after doing some more digging, i think i might have found it. XOOPS IS probably doing something to my single quotes because it gets sent to the database.

i'll post again when/if i can fix it (unless it really was my prog, but now doubt that is the case)

[edit]
Now i'm 100% certain that it's XOOPS that is causing the problem. after commenting out
// file: include/common.php line ~160
session_set_save_handler(array(&$sess_handler'open'), array(&$sess_handler'close'), array(&$sess_handler'read'), array(&$sess_handler'write'), array(&$sess_handler'destroy'), array(&$sess_handler'gc'));
the module started working fine with single-quotes. now to figure out the fix.
*pulls more hair out*



74
zer0fill
Xoops IS parsing our session objects (FIX INSIDE)
  • 2004/1/2 7:16

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


The FIX 2 posts down has been reported in the bugs forum.

I'm having one hell of a time debugging a module. whenever i serialize an object that has single quote (') attributes, the object either gets array(), unset, or never saves the info.

having tested the object right after serializing it to the session shows the single-quotes are still there, but after it finishes loading the page to be used again (it sends a header('page.php');die(); right after serializing), the error pops up.

does XOOPS perform some kind of security check on all objects in the session? i'm pretty sure it's somewhere hidden deep in my code (it's a port from a stand-alone smarty app) but thought i'd give it a shot to see if it was really XOOPS doing something so i can stop pulling my hair out.

thanks all :)

fwiw, i'm saving it like
$_SESSION['mymodule']['obj'] = serialize($obj);
header('Location: edit.php?'.SID.'&action=edit');die();

btw, it works fine if the user doesn't type in a single-quote and works fine on the pre-xoops site (with or without single-quotes).



75
zer0fill
Re: Using smarty in module's admin menu?
  • 2004/1/1 3:02

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


i meant, is there an easy way to do it like in the module (user side)? i've looked though a lot of other modules and their admin side files all mix php with html than just using smarty.

my point was when/if the admin-side will be using smarty by default. afaik, i have to start including every smarty piece than letting the XOOPS core do it for me.

ex:
...
    default: 
// show list
        
$xoopsTpl =& new XoopsTpl();
        
$xoopsOption['template_main'] = 'site_admin/index.tpl';
        
$xoopsTpl->display(XOOPS_ROOT_PATH.'/modules/mymod/templates/site_admin/index.tpl');
...

gives me an error
Fatal errorCall to undefined function: () in d:domainssomedomain.orgpublic_htmlclasssmartySmarty.class.php on line 1658


[edit]
Wow. that was easier than i thought; didn't know i can still call the 'db:' argument in the $xoopsTpl->display. for anyone else that's interested, this is all you need in the admin file

include(XOOPS_ROOT_PATH.'/class/template.php');
$xoopsTpl = &new XoopsTpl();                        
$xoopsTpl->display('db:site_admin/formwiz_admin_index.tpl');



76
zer0fill
Re: Using smarty in module's admin menu?
  • 2004/1/1 2:46

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


^bump



77
zer0fill
Cool holiday banner :)
  • 2003/12/24 6:04

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


I like the holiday banner. looks really spiffy and reminds me of something i'd see on TechTV

Happy Holidays everyone



78
zer0fill
Variables in language constants?
  • 2003/12/23 21:10

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


I doubt this is possible, but i'll try anyways.

Can i put in variables inside the define() like in language/english/main.php? What i want to do is make error messages along with the user's input. by doing this, the user sees exactly what s/he typed in.

ex: i have an error check for duplicate titles and want to use redirect_header() saying something like "Sorry, title <b>How old are you? is already in use. <br />Sending you back to the editor".

[edit]
hmm.. how about this work-around: split the language files, so redirect_header() will look like
redirect_header('edit.php?'.SID.'&action=edit'7_MD_FORMWIZ_TITLE_EXISTS1of2.$form->title._MD_FORMWIZ_TITLE_EXISTS2of2);


Is this how everyone else does it?



79
zer0fill
Re: A better approach for Polls
  • 2003/12/23 4:23

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


i'm with RicoCali on this one. there are a lot of sites that do this such ashttp://xbox-scene.com (just for example, doubt they use xoops). users will get the same info in the small right or left block as they do with a full-page center block.



80
zer0fill
Re: Post your feature requests for the newBB
  • 2003/12/23 4:05

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


Admin Side
1. More user-friendly interface.
When adding several new category or forum, it's a pain in the butt because i get sent back to newBB's main menu which means a lot of clicking. phpBB's interface is pretty good since you see everything in one window and the ability to add categories, forums, and re-arrange right there. In addition to that, we see the category each forum belongs to. As it is now, if we have an "Announcements" forum in every category, how do we know which "Announcements" we are editing if we want to change the title? (We just have a dropdown with several "Announcements" forums).

2. unlimited sub categories

3. Moderator is optional. If no moderator is assigned, the Admin is the implied moderator.

4. Remember our input if you must display an error on a seperate page. i dont remember how many times i forgot to put something in after typing out a long-ish description. now i save everything to notepad before hitting submit.

User Side
links in each post (suggested placement)
1. Link going to recipient (who post was for)
- Right-alined on the "Posted on" bar
- <a href...>@Post#3</a>
2. Link for that specific post (for easy reference linkage)
- Before poster's name
- Probably post #in thread (ie: 3rd post has an <a href...>post3</a>
3. (bug?) When we post in a multi-page thread, we get sent to the first page than our post.
4. Highlight searched text ala vB
- &highlight=text+query in the url will highlight all matching text in the thread
5. show only one instance for each thread hit (in searches)
6. show search results by post
7. search query must be in body of a post, not the whole thread.
ie: "cookie AND disabled ie OR mozilla"
because of the quotes, and AND/OR constraints, every query must be in someone's post. if cookie and disabled appeared in sperate posts, it will not be a successful hit.
8. (NEW) numbered, bulleted listing (with sub-sub-sub bullets)
maybe something like
[list]
[*]main cat1
[*][*]sub cat
[*][*][*]sub sub cat
[*]main cat2
[/list]
don't know of any boards that allow this (sub cats)
9. (NEW) Tables? similar to Smarty's wiki
||cell one || cell two ||
|||| big ol' line ||
|| cell four || cell five ||
(notice empty cell in row two)
i don't think any other message board allows tables
10. google-like searches cookie -mozilla
11. [php][/php]
12. highlight a word, click the link button, type url, and presto the word is now surrounded by [url=http://..]word[/url]
13. allow registered users to specify how many posts per page we can vew (ie: 20, 50, 100, 200 posts per thread page). same with thread listing
14. prune to tar.gz (so we still have a history)
15. auto-check "notify me.." when submitting or replying to a thread. it should see our preference via our account settings. (send notification by email)




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



Login

Who's Online

144 user(s) are online (88 user(s) are browsing Support Forums)


Members: 0


Guests: 144


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