1831
trabis
Re: The XOOPS Project in 2008 - module repository reform
  • 2008/1/8 1:32

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Downloading
Thanks!



1832
trabis
Re: How to create dynamic entries of menus and submenus in the main menu?
  • 2008/1/8 1:10

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Yes you can!

Here is one example from the 'news' module:
/**
 * This part inserts the selected topics as sub items in the XOOPS main menu
 */
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname($modversion['dirname']);
if (
$module) {
    global 
$xoopsUser;
    if (
is_object($xoopsUser)) {
        
$groups $xoopsUser->getGroups();
    } else {
        
$groups XOOPS_GROUP_ANONYMOUS;
    }
    
$gperm_handler =& xoops_gethandler('groupperm');
    if (
$gperm_handler->checkRight("news_submit"0$groups$module->getVar('mid'))) {
          
$cansubmit 1;
    }
}

// ************
$i 1;
global 
$xoopsDB$xoopsUser$xoopsConfig$xoopsModule$xoopsModuleConfig;
// We try to "win" some time
// 1)  Check to see it the module is the current module
if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
    
// 2) If there's no topics to display as sub menus we can go on
    
if(!isset($_SESSION['items_count']) || $_SESSION['items_count']== -1) {
        
$sql "SELECT COUNT(*) as cpt FROM ".$xoopsDB->prefix("topics")." WHERE menu=1";
        
$result $xoopsDB->query($sql);
        list(
$count) = $xoopsDB->fetchRow($result);
        
$_SESSION['items_count'] = $count;
    } else {
        
$count $_SESSION['items_count'];
    }
    if(
$count>0) {
        include_once 
XOOPS_ROOT_PATH.'/class/tree.php';
        include_once 
XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php';
        include_once 
XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
        
$xt = new NewsTopic();
        
$allTopics $xt->getAllTopics(news_getmoduleoption('restrictindex'));
        
$topic_tree = new XoopsObjectTree($allTopics'topic_id''topic_pid');
        
$topics_arr $topic_tree->getAllChild(0);
        if (
$module) {
            foreach (
$topics_arr as $onetopic) {
                if (
$gperm_handler->checkRight('news_view'$onetopic->topic_id(), $groups$xoopsModule->getVar('mid')) && $onetopic->menu()) {
                    
$modversion['sub'][$i]['name'] = $onetopic->topic_title();
                      
$modversion['sub'][$i]['url'] = "index.php?storytopic=" $onetopic->topic_id();
                   }
                   
$i++;
               }
        }
        unset(
$xt);
    }
}


As for sub categories I don´t think it is possible, but using the same logic above you could show them in the main menu when you are viewing the parent category.

Hum, let me see, if that info can show dynamicaly without having to update the module then...
Then maybe it has a direct relation just with the main block and with nothing else.
If this is true then you can change your main block to fecth an extra array containing the sub categories menus.


$modversion['sub'][$i]['extra'] = array containing name and url for each subcat!!!!



1833
trabis
Re: www.Xoopsaddons.org hacked?
  • 2008/1/5 14:18

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

The XoopsAddons was the most up to date repository, so it was important to compare it to them and see what we are missing. Then suddenly day later the whole XoopsAdons Websites goes down. Was it because somebody didn't want XOOPS to have all the latest modules listed on XOOPS? Is there any correlation to what Darcy was doing, or was it just a pure coincidence?


Or was it because somebody did want to have all the latest modules listed on XOOPS and found an easy way to do it?



1834
trabis
Re: New project for users profile/blog module
  • 2008/1/2 13:32

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I noo-b,
You can use your modules the usual way.
In your example, the news post will apear in modules/news and in modules/users (under your own(admin) blog and/or profile).

You can set, if you want, a news category just for the profile/blog and then change your news plugin to fecth only that category. Or you can make the plugin skip your admin news if you don´t want them to show under the admin's blog.

:)



1835
trabis
Re: Signed member in the comments?
  • 2007/12/31 19:46

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I thook,
You must replace all the content of the file with the one above (and not just the added function in the bottom).
Nothing else is needed for it to work.
If users have their signature set to show on their profile, then it should apear on any comment the same way as they do in the forum posts.



1836
trabis
Re: New project for users profile/blog module
  • 2007/12/31 13:55

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Thanks noo-b, that is just what I wanted to hear. Some of thoose features I already had in mind, others can be implemented by the plugin system. For example the simple blog. The idea is to use a module like news for example. With a plugin it can be integrated on the profile and also in the blog view. The blog/profile is powered by other modules.
Users module stands alone as a profile module. You need to have other modules to feed him.
The friendly user name and the friendly blog name will be added yes. A log of the blog and the profile view must be done to. Maybe I will create an extra tab for stats so every module can feed their stats there. Its a great ideia!

Thanks again!
Btw smartprofile and yogurt are not finished yet that is why they have bugs. I have taken care of the smartprofile ones, as for the yogurt part there is no bugs because I don´t use the yogurt code, just some css and the enviroment idea!



1837
trabis
New project for users profile/blog module
  • 2007/12/30 23:36

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I´d like to know your opinion on this:
http://xoopsinfo.com/modules/newbb/viewtopic.php?forum=9&post_id=6344#forumpost6344

Ideas or some help are needed!



1838
trabis
Re: Signed member in the comments?
  • 2007/12/29 19:48

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


What can I say? The signature will be attached in system comments as it happens in forum posts. Just replace that file content. Is not that what you want?



1839
trabis
Re: Forms problem
  • 2007/12/29 14:52

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Thanks Shine! The code was correct yes but copyng it to this Box deleted the slash. It is a bug...
So where is "n" it is suposed to show "\n"




1840
trabis
Re: Troublous problems on building a new block BUT i built blocks successfully before.
  • 2007/12/29 3:17

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Maybe you reached your disk space limit, eheh!
Well, I don´t think XOOPS has problems with the number 11, or was it the 13?
Hum...
Double check your code, see if you have a repeated function, comment some lines, debug it.

What do you mean with:
5:[Make sur that the block is in the right sequence.]
???




TopTop
« 1 ... 181 182 183 (184) 185 186 187 ... 190 »



Login

Who's Online

211 user(s) are online (146 user(s) are browsing Support Forums)


Members: 0


Guests: 211


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