1
ChowSinWon
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 10:39

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


Quote:

rajaito wrote:
And maybe just maybe you might know the answer to a similar question I have about our download section. I posted it here:

http://www.wf-projects.com/modules/ipboard/index.php?act=ST&f=11&t=1168&s=5d639643f5fc9d397961c8ce37c85589


i am sorry, but i do not use wf-downloads. maybe i'll try it sometime, but not right now.

ric



2
ChowSinWon
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 10:15

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


Quote:

rajaito wrote:
Now if I could just make it say "View(username)'s Gallery".


no problem:
add a new constant to the language-file (/language/english/user.php)
define('_US_VIEWGALLERY',"View %s's Gallery");

and in /userinfo.php you exchange the first long line of my new ones by this one:
$xoopsTpl->assign('user_gallery''<a href="' XOOPS_URL '/modules/xcgal/index.php?cat=' . (10000 $thisUser->getVar('uid')) . '">' sprintf(_US_VIEWGALLERY$thisUser->getVar('uname')) . '</a>');

and voilà

ric



3
ChowSinWon
Re: XCGAL: post a direct link from users profile
  • 2005/6/8 18:08

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


hey there.

i just implemented, what you asked for...it's a small hack for XOOPS version 2.0.10.

i modified following files:
/userinfo.php
/language/english/user.php
/modules/system/templates/system_userinfo.html

following lines i added to /userinfo.php after line with
$xoopsTpl->assign('lang_notregistered', _US_NOTREGISTERED);
$xoopsTpl->assign('lang_gallery'_US_GALLERY);
if(
file_exists(XOOPS_ROOT_PATH '/modules/xcgal/albums/userpics/' . (10000 $thisUser->getVar('uid'))))
    
$xoopsTpl->assign('user_gallery''<a href="' XOOPS_URL '/modules/xcgal/index.php?cat=' . (10000 $thisUser->getVar('uid')) . '">' _US_GALLERY '</a>');
else
    
$xoopsTpl->assign('user_gallery''--');


in /language/english/user.php i added a constant after
define('_US_SHOWALL','Show All');
(you have to add this constant for other languages, too, if you use any):
define('_US_GALLERY','Gallery');


and lastly, i modified the template /modules/system/templates/system_userinfo.html by adding following lines like this:
<tr valign="top">
          <
td class="head"><{$lang_extrainfo}></td>
          <
td class="odd"><{$user_extrainfo}></td>
        </
tr>

        <!-- 
start of new code -->
        <
tr valign="top">
          <
td class="head"><{$lang_gallery}></td>
          <
td class="odd"><{$user_gallery}></td>
        </
tr>
        <!-- 
end of new code --> 

      </
table>


that worked quite nice for me. maybe you can use that, too.

i have to point out, that this is a hack to the core system, so if you update your XOOPS after that hack, these modifications might become erroneous!

greetings,
ric



4
ChowSinWon
Re: sql query with union
  • 2005/6/4 12:34

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


Quote:

Mithrandir wrote:
Quote:
xoops recognizes that query as UPDATE

Not quite. XOOPS recognizes the query as a non-SELECT query - due to the ( before the SELECT.

Try the query without brackets.


i see.
so the error message of debugger was wrong
Quote:
Database update not allowed during processing of a GET request


thanx.



5
ChowSinWon
sql query with union
  • 2005/6/4 11:57

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


hi there.

i just stumbled on this little problem.
since i still am not familiar enough with xoops, it took me some time, to solve it.

i was using a MySQL query with UNION (available since MySQL 4.0) like that:
(SELECT a FROM table1UNION (SELECT a FROM table2)

that worked for me quite wonderful.
but XOOPS recognizes that query as UPDATE which makes usage of $xoopsDB->query($sql) in a GET request impossible.

i am aware, that queryF($sql) exists and it does work fine, but isn't it just wrong?

or maybe i am just missing something...

greetings
ric



6
ChowSinWon
Re: Can admin log-on as other user?
  • 2005/6/3 10:26

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


i don't know how to log-on as that user, but i solved that described problem by loading that stuff up (with many pics i'm using batch-upload, this is only possible for admin) and then manually reassigning the user-id of the newly uploaded pics in database.

worked for me.

greets
ric




TopTop



Login

Who's Online

183 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

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

Latest GitHub Commits