1
KubaZ
Re: Email protection hack in userinfo.php
  • 2007/3/12 11:40

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Hi,

today I got a message that link is dead.
Apparently I deleted this because I didnt use XOOPS for a long time.
I will try to repair link, and post a message on forum.

Edit: link works

Cheers
KubaZ



2
KubaZ
Re: Need a little hack for mylinks
  • 2005/6/12 22:51

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Hi , I think that you have to inform your script you use random sorting :

$rand = isset($HTTP_GET_VARS['rand']) ? intval($HTTP_GET_VARS['rand']) : 1;


if ( (isset(
$HTTP_GET_VARS['orderby'])) && ($rand == 0)) {
$orderby convertorderbyin($HTTP_GET_VARS['orderby']);
} else {
$orderby "rand()";
}


and then you have to modify several links by adding variable rand to the url, e.g. ( add &rand=$rand )
$page_nav .= "$cid&min=$prev&orderby=$orderby&show=$show&rand=$rand'>« ";


next step:
change urls responsible for sorting in template :
mylinks_viewcat.html (add &rand=0)

<a href="viewcat.php?cid=<{$category_id}>&orderby=titleA&rand=0">


third step: I think adding url for random ordering will be useful (becouse after choosing normal sorting you can't use random sorting, except clicking on main links to viewcat.php will bring random links)
<a href="viewcat.php?cid=<{$category_id}>"><img src="images/(some image, maybe question mark, which describes random sorting)" border="0" align="middle" alt="" />



I don't know if there above is a mistake. I didn't test it. I took it from head :)



3
KubaZ
Re: Poll module question?
  • 2005/6/8 20:43

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Yes, it can be done due to changing code. Please tell me, which version of XOOPS do you have, and then I'll prepare changed code of this mod. :)



4
KubaZ
Email protection hack in userinfo.php
  • 2005/5/30 12:25

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Hi XOOPS World :)

Few days ago I read in polish magazine the way of protecting emails, simply create image with email address and spam robot's will be unable to read our addresses :)

I've made a little hack to use this protection in my XOOPS service.

DEMO: http://www.kongresruchow.pl/userinfo.php?uid=1

LINK:
http://www.kongresruchow.pl/kuba/xoops/emailprotection.tgz (200kb)


files:
[new] ./emailprotection.php
[new] ./include/arial.ttf
[need to change] ./userinfo.php

requirements:
GD library
Your famous font (I've put only arial.ttf )

To run this hack you will have to change userinfo.php
so Find this code:
if ($thisUser->getVar('user_viewemail') == 1) {
    
$xoopsTpl->assign('user_email'$thisUser->getVar('email''E'));
} else {
    if (
is_object($xoopsUser)) {
         
// All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
        
if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
            
$xoopsTpl->assign('user_email'$thisUser->getVar('email''E'));
        } else {
            
$xoopsTpl->assign('user_email'' ');
        }
    }
}


and change it into :

if ($thisUser->getVar('user_viewemail') == 1) {
    
$protectedEmail '.XOOPS_URL.'/emailprotection.php?uid='.$thisUser->getVar("uid").'">';
    
$xoopsTpl->assign('user_email'$protectedEmail);
} else {
    if (
is_object($xoopsUser)) {
         
// All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
        
if ($xoopsUser->isAdmin() || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
            
$protectedEmail '.XOOPS_URL.'/emailprotection.php?uid='.$thisUser->getVar("uid").'">';
            
$xoopsTpl->assign('user_email'$protectedEmail);
        } else {
            
$xoopsTpl->assign('user_email'' ');
        }
    }
}


(explanation: as you can see, I added one new line $protectedEmail = '';
which call our script file 'emailprotected.php'
and change
$xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E')); to $xoopsTpl->assign('user_email', $protectedEmail); to display image

TIPS: You can look into emailprotection.php if you want change color of font, size, etc.

And finally the link ! :
http://www.kongresruchow.pl/kuba/xoops/emailprotection.tgz (200kb)

It weight so much because of size of Arial.tff (stupid MS font)



5
KubaZ
Re: Gadu-Gadu PL Hack - solved
  • 2005/5/29 22:43

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


It is very simple. You have to edit your template (because XOOPS uses Smarty Engine), which is located in :

modules/system/templates/system_userinfo.html.

There you have something like this:

<tr valign="top">
          <
td class="head"><{$lang_icq}>td>
          <
td class="odd"><{$user_icq}>td>
        tr>


so, you localized where you have to change
So introduce changes :

<tr valign="top">
          <
td class="head"><{$lang_icq}>td>
          <
td class="odd">
<
img src="http://www.gadu-gadu.pl/users/status.asp?id=<{$user_icq}>&styl=1">
<
a href="gg:"><{$user_icq}>a>td>
        tr>


to give output

it's all :P



6
KubaZ
sharing xoops' users database
  • 2005/1/3 19:31

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Hi,

I'm wondering what (and how) I have to do to share user's database. For example if I have

http://www.myserver.com/xoops1/

http://www.myserver.com/xoops2/


and I would like after loging on one XOOPS system to be online on the other.

I think I need to use one user table I do hack on kernel files (user.php)

Is someone can help me solve this problem ?

thanks
KubaZ



7
KubaZ
smarty problem ?
  • 2004/9/11 10:52

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Hi,

I'm trying to resolve problem one of polish XOOPS user.

Please look at http://www.dragon.kielce.pl/kejti/xoops/

I think she has problem of smarty engine.. but maybe I don't think right.

can anyone help us.

for now I adviced to install newest version of XOOPS (2.0.7.2)
but still we have erros

2.0.7.2 ver -> at : http://www.dragon.kielce.pl/kejti/xoops3/index.php

baCio
KubaZ



8
KubaZ
Re: Poll hack: show poll results in a block on start page
  • 2004/8/20 14:24

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


thanks for expanding my hack :)



9
KubaZ
Re: Searching for a Counter-Strike server-module
  • 2004/4/28 22:56

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Hi,

I put one module on my private local site, which queries cs game. But I've change it from exoops (but code wasn't diffrent in sense of security)..and I haven't done language files (I've changed in polish without language )

but now I'm searching for:
1. new script for CS query
2. change module to config via Web (now you must edit .txt file )

tomorrow, when I will back to my home I will look out



10
KubaZ
Re: search user by name
  • 2004/4/28 12:30

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Yes, I had a little problem with it.

but I've looked into finduser.php (in system module)

Quote:

$member_handler =& xoops_gethandler('member');

$criteria = new CriteriaCompo();

$criteria->add(new Criteria('uname',$komputer, '='));

$total = $member_handler->getUserCount($criteria);

$foundusers =& $member_handler->getUsers($criteria, true);


so it is as you wrote thanks thanks

(and 3rd parameter is a part MySQL language like ('LIKE', >=) function uses it in SQL query in connection with WHERE )




TopTop
(1) 2 3 4 »



Login

Who's Online

143 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 143


more...

Donat-O-Meter

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

Latest GitHub Commits