262411
Vargr
The construction and contents of cookies
  • 2004/4/16 10:26

  • Vargr

  • Not too shy to talk

  • Posts: 130

  • Since: 2003/6/19



Right place?
------------
I am not sure this is the right forum to post this question, but I weren't sure where else I should post it.

Looking for:
------------
XOOPS uses cookies, that it stores on the users machine, in order to keep track of the user, what entries he has read, etc. At least as I understand it.

I would like to know how these cookies are organised - their format, where they are being produced (where in the code) and where they are being read - but I don't know where to find such information.

Why?
----
The present use of cookies seems - at least to me - to be ineffective. If I log in on one machine and read the news and then moved to another machine and log in, then it seems as if I didn't read any news at all. Having had a very brief look at the cookies left on my computer from xoops-sites, the information seems fairly short (in terms of space required to store it).
I am thus wondering if it would be possible and useful to store the cookie-information in the user's profile on the server in stead on some random computer somewhere, that the user might never access again.

Disclaimer
----------
I have no understanding of how these things work (that's why I am looking for some information in the firste place) and I am sure that the chosen solution (the cookies) was chosen for a reason. Just wondering - and hoping - it could be made smarter seen from the point of view of the user.




262412
_rhod
Login not working
  • 2004/4/16 10:23

  • _rhod

  • Just popping in

  • Posts: 1

  • Since: 2004/4/16


Hey guys. I just put up a XOOPS site hosted off a laptop i own and I'm not sure if it's how it's being hosted or the XOOPS site itself thats causing the problem. But 8/10 people aren't able to log onto the site. There attempts pretty much go like this:

Put in username and password. The next page is the thank you for logging in page then it will return to the page they tried to log into but the username and password boxes will still be there and not the user panel. Is there any rememdy for this?!



262413
blueangel
Re: wfchannel_v1.0.6 RC1 Released
  • 2004/4/16 9:27

  • blueangel

  • Module Developer

  • Posts: 132

  • Since: 2002/2/20


hi Catz, is always a pleasure for me to test your modules, because they are really useful and well made

I have just finish the italian translation of the language files, if for you is ok I send them to you via email

I have some plan to use your module in the future, and so I have started the debug

I didn't found any big problem up to now, maybe there is a little bug in the visualization in the index page

I have set a secondary page to be showed in the index page but its link does not appear: i will this test it soon more deeply and try to give you more information, but if other user has the same problem, please signal this.




262414
rh94040
Re: wfchannel_v1.0.6 RC1 Released
  • 2004/4/16 8:15

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


I'm using this with XOOPS 2.0.6. Two things I noticed with Refer a Friend:

1) The default value I entered for the email message body does not show up. It does get saved successfully.

2) The "Send" and "Clear" buttons text values are not externalized.

I tried to fix 2) but I think I'm missing something. I defined two _AM_ variables for them in the language/english/main.php file. In index.php I added
the two lines to do the substitution:
$xoopsTpl->assign('lang_submitbutton' , _MD_SUBMITBUTTON);
$xoopsTpl->assign('lang_clearbutton' , _MD_CLEARBUTTON);

And I modifed the templates/wfchannel_refer.html file
to use the lang_*button variables above. But they are not showing up.

Apart from doing these in the files, anything I need to do to the database for this fix to work?

Thanks,
Ray



262415
samuels
Re: Xoopsmembers search by group and rank (HACK)
  • 2004/4/16 8:02

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I don't know if it's usefull for you but I've made this hack to add a new search option. You can select one or more groups, and you will see only the users of these groups.
I have not tested it yet, perhaps runs or perhaps not

At xoopsmembers.php, after line 27:

function SearchByGroups($grps,$uid)
{
    
$User= new XoopsUser($uid);
    
$groupid $User->getGroups();
    for (
$i=0$i<count($groupid); $i++) 
    {
        if (@
in_array($groupid[$i], $grps))
        {
            return 
true;
        }
    }
}


With this little function you know if certain user is in one or more groups

Now, before the submit button
$form->addElement($submit_button);


Add a formselectgroup
$form->addElement( new XoopsFormSelectGroup (_MD_GROUPACCESS'groupid',false,array(1,2),3,true));


Documentation of this is HERE

First value: Description Text.
Second value: Name (must be unique in the form)
Third value: Do you want to show anonymous group?
4º value: Preselected values.
5º value: Number of lines to show.
6º value: Do you want to select more than one value?


Now we need to capture the form values.
After
$limit = (!empty($HTTP_POST_VARS['limit'])) ? intval($HTTP_POST_VARS['limit']) : 20;
    if ( 
$limit == || $limit 50 ) {
        
$limit 50;
    }


Add this
$groupid = ($HTTP_POST_VARS["groupid"]);


And now it's the time to use the function. I don't know how to use CriteriaCompo objects. This is and easy way to do that.

Look for line:
foreach (array_keys($foundusers) as $j) {


And add after:
if (SearchByGroups($groupid,$foundusers[$j]->getVar("uid")))
        {


And before line:
$totalpages ceil($total $limit);


Add:
}


I hope this code can help you a little.



262416
gruessle
Math
  • 2004/4/16 7:10

  • gruessle

  • Friend of XOOPS

  • Posts: 348

  • Since: 2003/9/20


Following code is from MyAds file myads_category.html.

I can't get it to show colums and rows right.
I think it has something to do with <{math equation="i % 3" and style="width:33%. I have tried all possible combinations I could think of.

I don't care anymore if i have 2 or 3 columns if I just get it right.

The way it is right now it shows
2 colmns then one single
2 colmns then one single
2 colmns then one single
etc.

You can see it here:
http://www.vmclinks.com/x/modules/myAds/index.php?pa=view&cid=2


<table border="0" style="width:100%;">
        <{foreach 
item=cat from=$subcategories}>
        <{
math equation="i % 3" i=$cat.i assign="mod"}>
            <{if 
$mod == 0}><tr><{/if}>
            <
td valign="top" align="center" style="width:33%;">
            <
table class="outer" cellspacing="0" style="width:100%;">
              <
tr><td class="head"><{$cat.image}> <{$cat.link}> (<{$cat.adcount}>) <{$cat.new}></td></tr>
            </
table>
            </
td>
            <{if 
$mod == || $cat.== $subcat_count}></tr><{/if}>
        <{/foreach}>
      </
table>



262417
jackt
Re: Preparing Text to go in and out of a Xoops DB
  • 2004/4/16 6:55

  • jackt

  • Just popping in

  • Posts: 31

  • Since: 2002/6/2 2


I've noticed that extending the XoopsObject class conveniently formats text for you assuming you initVar to set the data types, and then getVar and setVar will "sanitize" the text for database entry or display. I've also seen kernel and some OO based core modules also include a corresponding Handler class to handle database manipulation. Howvever, there exists very very few modules that actually take this route. The few modules that are OO either create a renderer class for display (I don't even quite understand why you'd throw in an extra layer between the calling page and smarty, why would you even need another class to render output for you.) or throw in database manipulation methods into the that very class.

I'm wondering what the benefit is by separating "data access mechanisms" methods into a handler class? No one seems to be doing it, but the core classes are practically all done this way.

In addition, it'd be very useful to include the initVar, getVar, setVar, etc functions in the module developement wiki. Alot of people don't use what's supplied in the core, and it would help them tremendously to know these tools are provided to you.



262418
GOwin
now using v1.4
  • 2004/4/16 6:19

  • GOwin

  • Just popping in

  • Posts: 78

  • Since: 2003/5/2 9


but i still get one notice:
Quote:
Notice: Constant _MSW_B_INTHE already defined in /home/zeus/public_html/ismash/modules/ms_weather/language/english/blocks.php on line 36



262419
longhair
Re: about delete webmaster
  • 2004/4/16 6:11

  • longhair

  • Friend of XOOPS

  • Posts: 70

  • Since: 2004/3/29



No, user 3, or for what it's worth, user ID 5 in the sql database.



262420
GOwin
yipee!
  • 2004/4/16 5:39

  • GOwin

  • Just popping in

  • Posts: 78

  • Since: 2003/5/2 9


i appreciate the assistance and the effort.

i removed the current installation of WB v0.99, uploaded a new copy, reinstalled it, and reloaded my previous data.

unfortunately, i still get the same error. :(

I decided to search the net about "T_PAAMAYIM_NEKUDOTAYIM" and found that there are instances where editing via your server's text editor introduces unwanted characters into your script.

having remembered the first error i encounter (first post on this thread), and your recommendation to edit the cause of the error (which i did via the server's text editor) i was excited to find out that it probably was the same case for me.

so i re-edited random_term.php using a local editor, uploaded - and voila! it's up again!

thanks a lot for a great module and excellent support sir!







Login

Who's Online

139 user(s) are online (76 user(s) are browsing Support Forums)


Members: 0


Guests: 139


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