191
samuels
Re: Mark all messages read hack practically finished
  • 2004/1/25 18:47

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


This version uses only a cookie, it runs perfectly with very big forums (i've tested it in a forum with more than 10.000 posts)

Here is the hacked files:
http://www.forjandoleyendas.com/uploads/mark_all_messages_read_v2.zip



192
samuels
Re: Mark all messages read hack practically finished
  • 2004/1/22 22:38

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I've got a new version, perhaps tomorrow i'll finish it.



193
samuels
Re: Add spaw WISIWYG editor to newbb
  • 2004/1/20 20:17

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I've updated it, download again.



194
samuels
Re: How to use Spaw within your modules. Examples
  • 2004/1/20 9:23

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I'm triyng to integrate image manager with spaw, but I've a lot of problems.
I don't know why spaw editor rejects it.
Nowadays i must drop the image inside the text area to use it.

Any idea?



195
samuels
Re: show group in newbb
  • 2004/1/19 21:15

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I can't wait too, the hack is in module hacks forum.

I've tested on my site forum
fl forum



196
samuels
Show user groups in newbb
  • 2004/1/19 21:03

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


With this hack you'll see the owner user groups for each post.
A little screenshot:
Resized Image

Instructions:
Download the hack here , or apply it manually.

For appling manually:

1º Open modules/newbb/viewtopic.php

Add this after line "include 'header.php';"

//----------------------hack show groups by samuels-------------------------------------------------------------
        
function GetGroupsNames ($uid)
        {
            
$member_handler =& xoops_gethandler('member');
            
$User= new XoopsUser($uid);
            
$user_groups=$User->getGroups();
            
$count count($user_groups);
    
//$groups =& $member_handler->getGroups();
            
for ($i=0;$i<$count;$i++)
            {
                
$thisgroup =& $member_handler->getGroup($user_groups[$i]);
                
$g.=$thisgroup->getVar('name')." <br>";
            }
            return (
$g);
        }

//----------------------end hack show groups by samuels---------------------------------------------------------



In the same file viewtopic.php look for the line

$posterarr =  array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'</a>''poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);




And change for:

//----------------------hack show groups by samuels-------------------------------------------------------------
                    //$posterarr =  array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'</a>', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);
                    
$posterarr =  array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'</a>''poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status'poster_groups' => GetGroupsNames($eachposter->getVar('uid')));
                    
//----------------------end hack show groups by samuels---------------------------------------------------------


[/code]
And finally, look again for the line:

$posterarr =  array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'</a>''poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);


And change for:

//----------------------hack show groups by samuels-------------------------------------------------------------

                //$posterarr =  array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'</a>', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);
                
$posterarr =  array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'</a>''poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status,'poster_groups' => GetGroupsNames($eachposter->getVar('uid')));

//----------------------end hack show groups by samuels---------------------------------------------------------



Ok, we have finished hacking newbb, now we need to change the newbb_thread.html template

ADVICE:THE DEFAULT TEMPLATESET CAN'T BE MODIFIED YOU MUST CLONE IT.

After cloning the default templateset you must activate the new templateset in system preferences and edit the newbb_thread.html in the templateset manager.

I have made this one for showing the groups under number of posts:

<!-- start comment post -->
        <
tr>


          <
td class="head"><a id="forumpost<{$topic_post.post_id}>"></a> <{$topic_post.poster_uname}></td>
          <
td class="head"><div class="comDate"><span class="comDateCaption"><{$lang_postedon}></span> <{$topic_post.post_date}></div></td>
        </
tr>
        <
tr>

          <{if 
$topic_post.poster_uid != 0}>



          <
td class="odd"><div class="comUserRank"><div class="comUserRankText"><{$topic_post.poster_rank_title}></div><{$topic_post.poster_rank_image}></div><img class="comUserImg" src="<{$xoops_upload_url}>/<{$topic_post.poster_avatar}>" alt="" /><div class="comUserStat"><span class="comUserStatCaption"><{$lang_joined}>:</span> <{$topic_post.poster_regdate}></div><div class="comUserStat"><span class="comUserStatCaption"><{$lang_from}>:</span> <{$topic_post.poster_from}></div><div class="comUserStat"><span class="comUserStatCaption"><{$lang_posts}>:</span> <{$topic_post.poster_postnum}></div>

<
div class="comUserStat">
<
span class="comUserStatCaption">Grupos:</span> <br>
<{
$topic_post.poster_groups}>
</
div>


<
div class="comUserStatus"><{$topic_post.poster_status}></div></td>


          <{else}>

          <
td class="odd"> </td>

          <{/if}>

          <
td class="odd">
            <
div class="comTitle"><{$topic_post.post_title}></div><div class="comText"><{$topic_post.post_text}></div>
          </
td>
        </
tr>
        <
tr>
          <
td class="even"></td>

          <{if 
$xoops_isadmin == true}>

          <
td class="even" align="right">
            <
a href="edit.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href='delete.php?forum=<{$forum_id}>&topic_id=<{$topic_id}>&post_id=<{$topic_post.post_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$lang_delete}>" /></a><a href='reply.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{elseif 
$xoops_isuser == true && $xoops_userid == $topic_post.poster_uid}>

          <
td class="even" align="right">
            <
a href="edit.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href='reply.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{elseif 
$viewer_can_post == true}>

          <
td class="even" align="right">
            <
a href='reply.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{else}>

          <
td class="even"> </td>

          <{/if}>

        </
tr>

<!-- 
end comment post -->


The smarty key is <{$topic_post.poster_groups}>

Ok, the hack is finished. Please, check on "Update module template .html files from themes/your theme/templates directory?" in your system preferences to charge the new template. If it's running you can disable it again.

Byeeeeeez



197
samuels
Re: show group in newbb
  • 2004/1/19 10:42

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I'm working on a hack to show user groups. It's based in smarty, you can add it to your newbb_thread template, for example over rank image.
I have some problems but i think i'll have it this week.
I'll publish it in module hack's forum.



198
samuels
Re: Add spaw WISIWYG editor to newbb
  • 2004/1/17 8:57

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


The problem is because you must enable html in the forum to use the wisiwyg editor.
I know XOOPS can block javascript code, but for example if anybody makes a table and he doesn't close the <td> or <tr> labels, it can destroy the design.
In my newbb I have disabled the htmldesign option in spaw editor but I think it's a partial solution.
I'm not sure about php code injection.

Because "I'm not sure" I've said that it can be usecure.
(En español me expreso un poco mejor, espero que me hayas entendido XDXD)



199
samuels
Add spaw WISIWYG editor to newbb
  • 2004/1/16 22:13

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I know it can be a unsecure hack. I've made it only for testing purpouses.

INSTRUCTIONS:
1ºInstall the spaw module.
2º Replace the original newbb files with this
3º Activate html in the forum. Forums with html deactivated will show the old editor.



200
samuels
Re: Library Module
  • 2003/11/28 13:57

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


Ok, when I finish the first version I'll start adding features.

Status.

TODO:
-Edit individual user bookings by admin.
-Edit individual user fines by admin.

I don't want to say a release date, but, I'm working on it.




TopTop
« 1 ... 17 18 19 (20) 21 22 »



Login

Who's Online

101 user(s) are online (54 user(s) are browsing Support Forums)


Members: 0


Guests: 101


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