31
ladon
Re: PM Hacks...
  • 2005/6/5 16:28

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


You did miss something, I could've posted it clearer:

<{if $xoops_isuser}>
    <{
php}>
    GLOBAL 
$xoopsUser;
    
$pm_handler =& xoops_gethandler('privmessage');
    
$uid $xoopsUser->getVar('uid');
    
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
    
$criteria->add(new Criteria('to_userid'$uid));
    
$msgcount $pm_handler->getCount($criteria);
    
$GLOBALS['xoopsTpl']->assign('msgcount'$msgcount);
    <{/
php}>
<{/if}>


Put the same if $xoops_isuser around the pm inbox code.



32
ladon
Re: PM Hacks...
  • 2005/6/5 16:00

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Quote:

Cavan wrote:
ladon:

Thank you, but I'm not sure what you meant by "include the phpblock on top of your theme.html"...

<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>

Where do I put this?


Ehm, open theme.html located in the theme dir and add that code before everything else in there. Don't know how else to put it



33
ladon
Re: Can I use different themes for different pages?
  • 2005/6/5 13:07

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Nice addition, be sure do document it in the FAQ when it's implemented (or when 2.2 is released). Because I think there are quite some ppl around wanting to use something like this!



34
ladon
Re: Can I use different themes for different pages?
  • 2005/6/5 12:54

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Don't know how to achieve that using that code, do have a less clean trick for you though:

Rename theme.html to theme_main.html and create theme.html with only this code:

<{if $xoops_pagetitle == modulename thispage }>
    <{include 
file="themedir/themefile_extra1.html"}>
<{elseif 
$xoops_pagetitle == modulename thatpage }>
    <{include 
file="themedir/themefile_extra2.html"}>
<{else}>
    <{include 
file="themedir/theme_main.html"}>
<{/if}>


Of course this is only to be used in the theme that you use to display with that particular module (with the code you use in your previous posts).

Might not be the best solution, but it works



35
ladon
Re: PM Hacks...
  • 2005/6/5 12:42

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


I think this is the best way. You didn't account for the design whithin de if/else (non or > 0 where in different styles)

Include the phpblock on top of your theme.html, use the code below anywhere in in your theme.

<{if $msgcount 0}>

<
a href"<{$xoops_url}>/viewpmsg.php" onMouseOver"if (document.images) document.icon_mini_message.src='<{$xoops_url}>/themes/phpbbstyle/images/icon_mini_message2.gif';" onMouseOut"if (document.images) document.icon_mini_message.src= '<{$xoops_url}>/themes/phpbbstyle/images/icon_mini_message.gif';">
<
img src"<{$xoops_url}>/themes/phpbbstyle/images/icon_mini_message.gif" width=12 height=13 alt="Inbox" name="icon_mini_message" border=0>&nbsp;Inbox</a>&nbsp;(<span style="color:#ff0000; font-weight: bold;"><{$msgcount}></span>)

<{else}>

<
a href"<{$xoops_url}>/viewpmsg.php" onMouseOver"if (document.images) document.icon_mini_message.src='<{$xoops_url}>/themes/phpbbstyle/images/icon_mini_message2.gif';" onMouseOut"if (document.images) document.icon_mini_message.src= '<{$xoops_url}>/themes/phpbbstyle/images/icon_mini_message.gif';">
<
img src"<{$xoops_url}>/themes/phpbbstyle/images/icon_mini_message.gif" width=12 height=13 alt="Inbox" name="icon_mini_message" border=0>&nbsp;Inbox</a>&nbsp;

<{/if}>



36
ladon
Re: Menubar in pro2
  • 2005/6/5 12:26

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


<{if $xoops_isuser}>
         <
td id="top1">
             
Hallo <{$xoops_uname}>!&nbsp;&nbsp;
            <
class="userbar" href="<{$xoops_url}>/modules/news">Hjem</a>&nbsp;
            <
class="userbar" href="<{$xoops_url}>/modules/myalbum/index.php">Båtregister</a>&nbsp;
            <
class="userbar" href="<{$xoops_url}>/newbb/viewforum.php?forum=1">Forum</a>&nbsp;       
            <
class="userbar" href="<{$xoops_url}>/modules/xfguestbook/index.php">Søk jobb</a>&nbsp;
            <
class="userbar" href="<{$xoops_url}>/user.php?op=logout">Logg ut</a>&nbsp;  

          <{if 
$xoops_isadmin}>
          <
class="userbar" href="<{$xoops_url}>/admin.php" target="blank">Admin</a>
          <{/if}>
          </
td>
     
        <
td id="top2" align="right">
            <
form style="margin-top: 0px;margin-bottom: 3px;padding-right:30px;" action="<{$xoops_url}>/search.php" method="post">
             <
input type="text" name="query" size="12" /><input type="hidden" name="action" value="results" />&nbsp;
             <
input type="submit"  class="button" value="Søk" />
             </
form>
        </
td>  

       <{else}>

       <
td id="top1">
          <
class="login" href="<{$xoops_url}>/user.php"><u>Logg inn</u></a>
          
eller
          
<class="login" href="<{$xoops_url}>/register.php"><u>Bli medlem</u></a>
        </
td>

        <
td id="top2" align="right">
        <
form style="margin-top: 0px;margin-bottom: 3px;padding-right:30px;" action="<{$xoops_url}>/search.php" method="post">
        <
input type="text" name="query" size="12" /><input type="hidden" name="action" value="results" />&nbsp;
        <
input type="submit"  class="button" value="Cerca" />
         </
form>
        </
td>
      <{/if}>

Change the above to:
<{if $xoops_isuser}>
         <
td id="top1">
             
Hallo <{$xoops_uname}>!&nbsp;&nbsp;
            <
class="userbar" href="<{$xoops_url}>/modules/news">Hjem</a>&nbsp;
            <
class="userbar" href="<{$xoops_url}>/modules/myalbum/index.php">Båtregister</a>&nbsp;
            <
class="userbar" href="<{$xoops_url}>/newbb/viewforum.php?forum=1">Forum</a>&nbsp;       
            <
class="userbar" href="<{$xoops_url}>/modules/xfguestbook/index.php">Søk jobb</a>&nbsp;
            <
class="userbar" href="<{$xoops_url}>/user.php?op=logout">Logg ut</a>&nbsp;  

          <{if 
$xoops_isadmin}>
          <
class="userbar" href="<{$xoops_url}>/admin.php" target="blank">Admin</a>
          <{/if}>
          </
td>
     
        <
td id="top2" align="right">
            <
form style="margin-top: 0px;margin-bottom: 3px;padding-right:30px;" action="<{$xoops_url}>/search.php" method="post">
             <
input type="text" name="query" size="12" /><input type="hidden" name="action" value="results" />&nbsp;
             <
input type="submit"  class="button" value="Søk" />
             </
form>
        </
td>  

       <{else}>

       <
td id="top1">
          <
class="login" href="<{$xoops_url}>/user.php"><u>Logg inn</u></a>
          
eller
          
<class="login" href="<{$xoops_url}>/register.php"><u>Bli medlem</u></a>
          <
class="userbar" href="<{$xoops_url}>/modules/news">Hjem</a>&nbsp;
             <
class="userbar" href="<{$xoops_url}>/modules/myalbum/index.php">Båtregister</a>&nbsp;
          <
class="userbar" href="<{$xoops_url}>/newbb/viewforum.php?forum=1">Forum</a>&nbsp;       
          <
class="userbar" href="<{$xoops_url}>/modules/xfguestbook/index.php">Søk jobb</a>&nbsp;
        </
td>

        <
td id="top2" align="right">
        <
form style="margin-top: 0px;margin-bottom: 3px;padding-right:30px;" action="<{$xoops_url}>/search.php" method="post">
        <
input type="text" name="query" size="12" /><input type="hidden" name="action" value="results" />&nbsp;
        <
input type="submit"  class="button" value="Cerca" />
         </
form>
        </
td>
      <{/if}>



37
ladon
Re: PM Hacks...
  • 2005/6/4 8:20

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Look here. The FAQ shows you how to put it in a block. But if you don't want to use a block, look at the comments and see:

Quote:

<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>


I've set the above in between <{if $xoops_isuser}> <{/if}> otherwise I got a blank page when visiting my site anonymously.

This will allow you to use the following html anywhere in your theme:

Quote:

<{if $msgcount > 0}>
<a class="highlight" href="<{$xoops_url}>/viewpmsg.php">Inbox (<span style="color:#ff0000; font-weight: bold;"><{$msgcount}></span>)</a>
<{else}>
<a href="<{$xoops_url}>/viewpmsg.php">Inbox</a>
<{/if}>


I use this in my main theme.html. Emty everything between 'else if' as I did and it only shows anything when there is a PM (or more).

edit: look here for a pop-up when recieving a pm. Didn't get this to work on my site though, maybe you will.



38
ladon
Re: Literature
  • 2005/6/2 20:28

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Take a look at this: PopnupBlog. That might be what you need.



39
ladon
Re: OTS et Swish-e avec Xoops
  • 2005/6/2 20:23

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


babel fish:
Quote:
Hello everyone,

I had installed XOOPS under Windows XP, but I understood that it would be better to use ots and swish-e to assemble the whole under linux.

I mounted a waiter under redhat 9, installed apache and php and XOOPS and docmanager, all goes well until içi. I installed OTS and Swish-e, when I ask for a synopsis of file in docmanager, I find myself with a white page.

I understand more it is what the problem, any help would be appreciated.


Can't help with this, maybe some one from France

regard ici:http://www.frxoops.org/



40
ladon
Re: Smarty & PHP
  • 2005/6/1 20:12

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Thank you, I'm sure that will get me somewhere




TopTop
« 1 2 3 (4) 5 6 7 ... 24 »



Login

Who's Online

158 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

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

Latest GitHub Commits