1
ladon
Re: Can I add numbering to block listing?
  • 2006/10/23 6:07

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


You could try something like this, using smarty, in your theme.html:

{$count == 0}>
<{foreach 
item=block from=$xoops_ccblocks}>
  <{
$count =+}>
  <{include 
file="default/theme_blockcenter_c.html"}>
<{/foreach}>


And then use the $count varaible:
<div style="padding: 5px;">
  <
fieldset>
    <
legend class="blockTitle"><{$block.title}> # <{$count}></legend>
    
<div class="blockContent"><{$block.content}></div>
  </
fieldset>
</
div>
I am the BEST.......... at overstating things! - Resized Image



2
ladon
Re: hack needed?
  • 2006/10/22 3:17

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


No problem, glad to be of help

The reason you don't see it correctly (as admin) is because your personal setting prolly is 'old first' where it should be newest first. All users already registered prolly also have the standard 'old first' setting as well.
I am the BEST.......... at overstating things! - Resized Image



3
ladon
Re: hack needed?
  • 2006/10/19 20:30

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


impossible is nothing

I was hoping i could do this by using smarty, but that doesn't seem quite that easy. A quick and dirty way to do this is by doing the following:

Make sure that in admin->settings comment order is set to newest first. (this won't apply to registered users, but an SQL update statement should cure that).

Then, the ugly part: go to file /kernel/comnment.php and look for 'function &getByItemId'. In the parameters change '$limit = null' to '$limit = 10'.
I am the BEST.......... at overstating things! - Resized Image



4
ladon
Re: hack needed?
  • 2006/10/18 20:13

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Lol Kellymac, this is the most streched topic i've ever seen

What you want to do has nothing to do with this thread whatsoever. The reply button is integrated in the commenttemplate. As stated above just remove the button.

go to your templates admin -> system -> 'system_comment.html' find this line:
<a href="<{$replycomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>

and remove it. It's in there more then once, so remove where you want it (if user or if admin etc.)
I am the BEST.......... at overstating things! - Resized Image



5
ladon
Re: [How to] Create a nice (static) dropdown menu.
  • 2006/4/2 10:01

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Spankee, did you include de menu.js en added all the .css stuff? If you didn't add the javascript it will show the menu vertically in internet explorer because it can't handle proper css.

Concerning de pm warning, where it shows depends entirely on where you place it in your theme.html.

this schould be before everything else:
<{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}>


and this where you want the warning to be displayed:

<{if $msgcount 0}>
  <
class="highlight" href="<{$xoops_url}>/viewpmsg.php">PM inbox (<span style="color:red; font-size:10px; font-weight: bold;"><{$msgcount}></span>)</a>
<{else}>
  <
a href="<{$xoops_url}>/viewpmsg.php">PM inbox</a>
<{/if}>


Hope this helps you
I am the BEST.......... at overstating things! - Resized Image



6
ladon
Re: A new Fork : Xoops is dead, long live to Boops !
  • 2006/4/1 10:27

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Lol, that was quite some work for a.... f... d.. . Great one

I've allready clicked on boops, can't wait to get my hands on it
I am the BEST.......... at overstating things! - Resized Image



7
ladon
[How to] Create a nice (static) dropdown menu.
  • 2006/3/27 21:01

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


I’ve written this little guide three times now for ppl asking me for it trough PM. So this time I figured I’d post it in the forum. For someone having average knowledge of html/css this isn’t very hard. But I hope it’ll prove usefull for those who want to fiddle around with their theme, but don’t have the required knowledge the incorporate something like this dopdown menu.

To create a dropdown menu like I have on my website (www.zodt.nl) you’ll have to do four simple things.

Put the following code in a file called menu.js and place it in you theme folder. Firefox doesn’t need this .js (as it is a proper browser) but it’s needed for IE in order for the dropdown effect to work:
sfHover = function() {
    var 
sfEls document.getElementById("nav").getElementsByTagName("LI");
    for (var 
i=0i<sfEls.lengthi++) {
        
sfEls[i].onmouseover=function() {
            
this.className+=" sfhover";
        }
        
sfEls[i].onmouseout=function() {
            
this.className=this.className.replace(new RegExp(" sfhover\b"), "");
        }
    }
}
if (
window.attachEventwindow.attachEvent("onload"sfHover);


In the header of your theme.html, place this:
<script type="text/javascript" src="<{$xoops_url}>/themes/your_theme_dir/menu.js"></script>


Next, place de following code in your theme.html where you want the menu to display:
<{include file="your_theme_dir/theme_menu.html"}>


These last two steps will include code you’ll have to edit in order to blend it into your theme. As shown here is pretty much how I use it.

Now let’s add the important .CSS stuff. Add this to your_theme_dir/style.css: note: this css might not validate, never did a check, works for me
/* menu */

#nav, #nav ul {
  
margin0;
  
padding0 0px 0 0px;
  list-
stylenone;
  
font-family'Lucida Grande'VerdanaArialSans-Serif
  
font-size8px;
  
font-weightbold;
  
color#ffffff;
  
line-height20px;
  
text-indent:0px;
  
text-align:center;
}

#nav a {
    
displayblock;
    
width11em;
    
colorwhite;
}

#nav a:hover, nav a:visited {
    
displayblock;
    
width11em;
    
color#333;
}

#nav li {
    
floatleft;
    
width11em
    list-
style:none;
}

#nav li ul {
    
list-style:none;
    
positionabsolute;
    
background#4281B7;
    
width11em;
    
left: -999em;
    
margin0 0 0 -5.45em;
}

#nav li:hover ul, #nav li.sfhover ul {
    
leftauto;
}

#content {
    
clearright;
}

div.message {
    
text-align:center;
    
color:#0000FF;
    
font-size:15px;
    
border:thin;
    
border-style:dotted;
    
background-color#F3F1B2;
    
width:auto;
}
/* end menu*/


As seen in the second step we included a theme_menu.html. This is where the actual menu resides. So let’s create you_theme_dir/theme_menu.html:
<ul id="nav">
        <{if 
$xoops_isuser}>
        
        <
li>
          <
a href="<{$xoops_url}>/user.php">Hoi <{$xoops_uname}>!</a>
              <
ul>
                <
li><a href="<{$xoops_url}>/user.php">Mijn gegevens</a></li>
                <
li>
                  <{if 
$msgcount 0}>
                    <
class="highlight" href="<{$xoops_url}>/viewpmsg.php">PM inbox (<span style="color:red; font-size:10px; font-weight: bold;"><{$msgcount}></span>)</a>
                  <{else}>
                    <
a href="<{$xoops_url}>/viewpmsg.php">PM inbox</a>
                  <{/if}>
                </
li>
                <{if 
$xoops_isadmin}>
                  <
li><a href="<{$xoops_url}>/modules/webmailfx/">Webmail</a></li>
                <{/if}>
                <
li><a href="<{$xoops_url}>/notifications.php">Notificaties</a></li>
                <
li><a href="<{$xoops_url}>/user.php?op=logout">Uitloggen</a></li>
            </
ul>
        </
li>
            <
li>
              <
a href="<{$xoops_url}>">Zodt</a>
                  <
ul>
                    <
li><a href="<{$xoops_url}>">Home</a></li>
                    <
li><a href="<{$xoops_url}>/modules/about/index.php?id=1">About</a></li>
                    <
li><a href="<{$xoops_url}>/modules/sitemap/">Sitemap</a></li>
                    <
li><a href="<{$xoops_url}>/search.php">Zoeken</a></li>
                </
ul>
            </
li>
            
            <
li>
              <
a href="<{$xoops_url}>/modules/log/">Log</a>
                  <
ul>
                    <
li><a href="<{$xoops_url}>/modules/log/">Laatste logs</a></li>
                    <
li><a href="<{$xoops_url}>/modules/log/archive.php">Archief</a></li>
                    <
li><a href="<{$xoops_url}>/modules/log/submit.php">Submit</a></li>
                </
ul>
            </
li>

            <
li>
              <
a href="<{$xoops_url}>/modules/newbb/">Forum</a>
                  <
ul>
                    <{if 
$kubrick_selector == TRUE}>
                      <
li><a href="<{$xoops_url}>/newbb+search.htm">Zoeken in forum</a></li>
                       <!--<{if 
$mark_read}>
                        <
li><a href="<{$mark_read}>">Markeer gelezen</a></li>
                        <
li><a href="<{$mark_UNread}>">Markeer ongelezen</a></li>
                      <{/if}> -->
                      <
li><a href="http://www.zodt.nl/newbb+viewall.htm">Active topics</a></li>
                      <
li><a href="http://www.zodt.nl/newbb+viewall.type+unread.htm">Ongelezen topics</a></li>
                      <{if 
$viewer_is_admin == true}>
                        <
font color="#00FF00">MOD OPTIES</font><br />
                          <{foreach 
item=act from=$admin_actions}> <{$act}> <{/foreach}>
                        <{foreach 
item=actpoll from=$adminpoll_actions}> <{$actpoll}> <{/foreach}> 
                        <{/if}>
                    <{/if}> 
                  </
ul>
            </
li>

           <{if 
$xoops_isadmin}>
            <
li>
              <
a href="<{$xoops_url}>/admin.php">Admin</a>
                  <
ul>
                    <
li><a href="<{$xoops_url}>/admin.php">Admin Alg</a></li>
                    <
li><a href="<{$xoops_url}>/modules/log/admin/index.php?op=newarticle">Log posten</a></li>
                    <
li><a href="<{$xoops_url}>/modules/polls/admin/index.php">Poll admin</a></li>
                    <
li><a href="<{$xoops_url}>/modules/xoopsmembers/index.php">Memberstats</a></li>
                    <
li><a target="_blank" href="http://zodt.nl/phpmyvisites/">Full stats</a></li>
                </
ul>
            </
li>
               <{/if}>
            
          <{else}>
       
            <
li>
              <
a href="<{$xoops_url}>/user.php">Inloggen</a></a>
            </
li>
            <
li>
              <
a href="<{$xoops_url}>/register.php">Registreren</a>
            </
li>
            <
li>
              <
a href="<{$xoops_url}>">Zodt</a>
                  <
ul>
                    <
li><a href="<{$xoops_url}>">Home</a></li>
                    <
li><a href="<{$xoops_url}>/modules/about/index.php?id=1">About</a></li>
                    <
li><a href="<{$xoops_url}>/modules/sitemap/">Sitemap</a></li>
                    <
li><a href="<{$xoops_url}>/search.php">Zoeken</a></li>
                </
ul>
            </
li>
            
            <
li>
              <
a href="<{$xoops_url}>/modules/log/">Log</a>
                  <
ul>
                    <
li><a href="<{$xoops_url}>/modules/log/">Laatste logs</a></li>
                    <
li><a href="<{$xoops_url}>/modules/log/archive.php">Archief</a></li>
                </
ul>
            </
li>

            <
li>
              <
a href="<{$xoops_url}>/modules/newbb/">Forum</a>
                  <
ul>
                    <{if 
$kubrick_selector == TRUE}>
                      <
li><a href="<{$xoops_url}>/newbb+search.htm">Zoeken in forum</a></li>
                      <
li><a href="<{$all_link}>">Active topics</a></li>
                      <
li><a href="<{$unread_link}>">Ongelezen topics</a></li>
                    <{/if}> 
                </
ul>
            </
li>
            
          <{/if}>
        </
ul>


It should work now. As you might have noticed, there is a PM inbox count.
<{if $msgcount 0}>
  <
class="highlight" href="<{$xoops_url}>/viewpmsg.php">PM inbox (<span style="color:red; font-size:10px; font-weight: bold;"><{$msgcount}></span>)</a>
<{else}>
  <
a href="<{$xoops_url}>/viewpmsg.php">PM inbox</a>
<{/if}>

If you want to use that, add this to the top of your theme.html:
<{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}>

Besides letting you incorporate a PM warning in the menu, you can use this anywhere you want (in the theme files).

Need some more info on the inner workings and possibilities of this menu, see this site and this site

One last note: I’m not a pro, like StudioC for example. I mess with the code, and if it works, it works .
I am the BEST.......... at overstating things! - Resized Image



8
ladon
Re: New Spoiler Tag Hack!
  • 2006/3/25 13:43

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Hi, thanks for sharing this great hack. I made a some hacks there as well. You can make pretty much everything you want.

I wanted an edit tag so I added the following:

$patterns[] = "/[edit]/sU";
        
$replacements[] = '<font size="-2"><i><b>EDIT:</b>&nbsp;';
        
$patterns[] = "/[/edit]/sU";
        
$replacements[] = '</i></font>';


Which displays as the following: click. For this example you don't need to add anything to the .css file.
I am the BEST.......... at overstating things! - Resized Image



9
ladon
Re: Removing right side and even left blocks...
  • 2006/3/19 21:51

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


this might be what you're looking for:

code from Kubrick theme:

place this above all else in your theme.html:
<{php}>
    
$display_wide "kubrick newbb xoopsmembers";
    
$mod $GLOBALS['xoopsModule'];
    
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
    
$kubrick strpos($display_wide$dirname);
    
$GLOBALS['xoopsTpl']->assign'kubrick_selector'$kubrick );
<{/
php}>

In the line: "display_wide = "kubrick newbb xoopsmembers";" add any module names where you want to disable a certain column/block.

Then you can use this to remove the sideblocks all together:
<{if $kubrick_selector == TRUE}> <{else}> <td>blocks</td> <{/if}>

when TRUE leave emty and only add the TD's where between de else/ /if tags (when TRUE).
I am the BEST.......... at overstating things! - Resized Image



10
ladon
Re: Getting Magazine article template to fillwidth of site
  • 2006/3/12 22:43

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


that code is in admin/template but I don't know where exactly because I don't have to module installed. Just look through all the templates of the module. XOOPS admin/templates/magazine(list).
I am the BEST.......... at overstating things! - Resized Image




TopTop
(1) 2 3 4 ... 24 »



Login

Who's Online

129 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 129


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