71
bumciach
Adding notifications of posted comments
  • 2009/12/3 16:36

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Hi!
How to make options for comment events visible?
I made my own module with support for notification and comments, and the two things work separately. I read the XOOPS wiki that if comments are supported by the module, options for Comment and Comment Submit notifications will appear automatically. But they don't. Is there something I have overlooked in the wiki?



72
bumciach
Re: group module
  • 2009/11/30 12:04

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Is it XAM framework required in this module?



73
bumciach
Re: 30 Useful PHP Classes and Components
  • 2009/11/27 12:42

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


XMPPHP - Class for sending messages via XMPP (jabber) protocol. It would be nice, for example, to receive XOOPS notifications for your favorite IM (with xmpp support like GoogleTalk) :)



74
bumciach
Re: upgrade problem with Croatian characters
  • 2009/11/25 9:55

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Quote:

ghia wrote:
Your database seems to be latin1. The collation is not reported.
Change mainfile.php and global.php to use latin1 and ISO-....


Not exactly. In mainfile.php and global.php set what we want to have the output. So we set the same encoding in which the files are encoded (and what is set into <head> section in theme.html).
Setting the database has no meaning there. Provided that the characters in the database are not corrupted.

On my example. In the datebase I have latin2 and collation latin2_general_ci. But my pages are utf-8 so the mainfile.php is set to utf-8 and utf8_general_ci. It works without problems, although the encoding of the database and XOOPS is different.
It is simple only difficult to understand (a very long time I could not deal with it).



75
bumciach
sorting of Groups issue
  • 2009/10/26 12:25

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Is there any particular reason why the Criteria class is not fully supported by XoopsGroupHandler or XoopsMemberHandler? Something like this does not work:
$member_handler =& xoops_gethandler('member');
$criteria = new Criteria (null);
$criteria->setSort('name');
$criteria->setOrder('ASC');
$groups $member_handler->getGroupList($criteria);



76
bumciach
Re: updating from 2.3.1 - 2.3.3 ---already upgraded?
  • 2009/10/20 6:42

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Yesterday I did the upgrade (and also got 'No upgrade necessary'). But It seems that everything is OK. Changed the version number in the admin, so I suspect that the upgrade is completed. Only this message is somewhat misleading.



77
bumciach
Re: File Publisher module concept
  • 2009/10/15 8:47

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Thanks Mamba :)

I think, yes. I had such a dream to create a universal XOOPS tool for uploads. For now, however, I have to focus on implementing functionality, which personally I need in my module.

I am just starting to learn XAM, so I can not say anything concrete about it now.



78
bumciach
File Publisher module concept
  • 2009/10/2 13:25

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


I would like to show on which I currently work (but the module is still in alpha stage).

pfxfp - File Publisher for Xoops - download and install like a normal module.

File Publisher is not yet another Download Module. It is (or it will be) rather simple intranet solution for sharing files. For example, to make public the documents from the meeting for employees (upload multiple files at once).

Usage:
- after install go to yoursite/modules/pfxfp/ (there is no normal admin side yet)
- (the form "New category") create several categories and subcategories. In the text box with the path you can also add the name of a nonexistent directory (it will be created).
- (the form "Select Category to upload") Select the category to which the files will be loaded. Then you should see image buttion (like in uploadify demo http://www.uploadify.com/demo/). Do not change Destination there. Just click on the image button "Browse" and select files.
- to show the tree with files click "Show filetree" on the top

Problems:
- On some servers, file upload does not go smoothly (progres bar of each file is retained on a 100% - you need to click the red X to next file in the Queue were uploaded). I do not know yet the cause.
- Filetree appearance may not look good if the themes are defined styles for UL and LI elements. For example themes with content.css
#xo-canvas-content ul {
  
...
}
#xo-canvas-content li {
  
...
}



Remember, this is alpha (or even pre-alpha) version, to test plugins (Uploadify, filetree, treeview). Many things are hard coded.
At this stage, the files are listing directly from the directory. In future, there will be able to keep information about the files in the database (permissions, display time, descriptions, tags, etc.).
It would be nice if I could create a mechanism so that the files are available globally. For example, substituting wherever
<div class="id idnumber"> </ div>
would show the files from the category of "idnumber. Or
<div class="tags Tag1 tag2 tag3"> </ div>
shows files with a given tag. But even if it would be possible unless I do not have those skills up. Time will tell ;)



79
bumciach
Re: user id as a link?
  • 2009/9/8 7:49

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


And in your theme.html
<{if $xoops_isuser}><span>Welcome <a href="<{xoAppUrl /user.php}>"><{$xoops_uname}></a></span><{/if}>



80
bumciach
Re: how to use xoopstree for creating categories and subcategoires
  • 2009/9/2 10:03

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


If you want to use XoopsObjectTree you need to get data from a database as objects at the beginning. For this purpose, creating a class object, for example Category, into file /modules/mymodule/class/category.php
For more detail: https://xoops.org/modules/newbb/viewto ... =&topic_id=68782&forum=28
(in the example below, my module is called pfxfp, you have to rename it to yours modulename!)
class pfxfpCategory extends XoopsObject
{
    
/**
     * constructor
     */
    
function pfxfpCategory()
    {
        
$this->__construct();
    }
    
    function 
__construct()
    {
        
//definitions of the table field names (which includes categories) from the database 
        
$this->initVar("id_cat"XOBJ_DTYPE_INTnullfalse);
        
$this->initVar("id_parent_cat"XOBJ_DTYPE_INTnullfalse);
        
$this->initVar('name'XOBJ_DTYPE_TXTBOXnullfalse255);
    }
}

class 
pfxfpCategoryHandler extends XoopsPersistableObjectHandler
{
    function 
pfxfbCategoryHandler(&$db)
    {
        
$this->__construct($db);
    }
    
    function 
__construct(&$db)
    {
        
parent::__construct($db'pfxfp_categories''pfxfpCategory''id_cat');
    }

    function 
getCategories($criteria=null)
    {
        if (!
is_object($criteria)) {
          
$criteria = new Criteria(null);
          
$criteria->setSort('name');
          
$criteria->setOrder('ASC');
        }
        
$ret $this->getObjects($criteria);
        return 
$ret;
    }
}

and call in a script
//initialize category class (modulename is importat!)
$obj_handler =& xoops_getModuleHandler('category''pfxfp');
//get data as objects
$objs $obj_handler->getCategories();
//transmitting data to XoopsObjectTree, the parameters ('id_cat', 'id_parent_cat') are the same as the class category
$kt = new XoopsObjectTree$objs'id_cat''id_parent_cat' );


If you want form with select categories
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$cform = new XoopsThemeForm("form title""frm");
    
$cform->setExtra('enctype="multipart/form-data"');
    
//$kt refers to XoopsObjectTree
  
$a $kt->makeSelBox"id_parent_cat""name"'-- ' ''true );
  
$cform -> addElement( new XoopsFormLabel'Categories'$a ), true );
  
$cform->display();




TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 14 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

62 user(s) are online (31 user(s) are browsing Support Forums)


Members: 0


Guests: 62


more...

Donat-O-Meter

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

Latest GitHub Commits