xoops forums

Forum Index


Board index » All Posts (tripmon)




tripmon

Module Developer
Posted on: 2009/3/14 3:31
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#1

Re: on behalf of - Multimailer

maybe you could use
$xoopsMailer->setFromEmail();

with whatever is calling the mailer

an example:
To change all outbound mail to the current username followed by the XOOPS admin configured 'From' value...
i.e.

Sent on behalf of Earl Wilson by xoopsadmin@xoops.org

Set your language constant in:
\language\english\mail.php
_define("_MAIL_BEHALF""Sent on behalf of %s% by ");

in \class\mail\xoopsmultimailer.php change line 159 to:
$xoopsMailer->setFromEmail(sprintf(_MAIL_BEHALF,$xoopsUser->getVar('uname') . $xoopsMailerConfig['from']));


Of course you could use a much more elegant/conditional implementation with replyto and more (assign variables within a module and set an if condition in xoopsmultimailer.php ) but I'm not even sure if I'm answering what you were asking so I won't go too deep. The xoopsUser var would need to be included as a global for this example to actually work.



tripmon

Module Developer
Posted on: 2008/11/14 22:46
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#2

Re: How do I edit the mail to administrators notifying them of a new registration?

delete the files in templates_c


tripmon

Module Developer
Posted on: 2008/7/31 21:25
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#3

Re: Active Directory Configuration

Very cool to post your solution... TX!


tripmon

Module Developer
Posted on: 2007/11/21 2:16
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#4

Re: Tripmon - I need help with mxDirectory!

Hi All,

Have been crazy busy with new job, house & baby... Sometimes I wake up and don't know what day it is.

My buddy and a big contributor to the last release Zyspec has asked if he could release the version we have been sitting on for some time (waiting for 2.0.17 to stabilize) after he makes some mods and a couple of adds to it.

Sadly, I don't have time right now ( and may not for a few more months) to put much into this, but I have promised Zyspec that I will help if and where he needs me as my time allows.

Thanks for the support & I hope to do more with XOOPS soon.


tripmon

Module Developer
Posted on: 2007/9/18 20:14
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#5

Re: DMS Module questions

create a php page with the following inside it and upload it to your server's root... then visit the page and you will see the path as DMS needs to have it entered (the path will be to your root, so path out any sub directories accordingly)
<?php print $PATH_TRANSLATED;?>


tripmon

Module Developer
Posted on: 2007/7/31 22:07
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#6

Re: Usage of xHelp module

Go to sourceforge and look up the project, there is a newer version not listed on this site.


tripmon

Module Developer
Posted on: 2007/3/11 15:13
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#7

Re: MXdirectory 3.01 RC1 Problem

The issue is actually with the last change in the smarty template system...

are you still getting a blank index page?


tripmon

Module Developer
Posted on: 2006/12/19 19:28
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#8

Re: Mx-Directory 3 RC1 Blank page under xoops 2.016

Sorry RedEye,

I read your post wrong.

Well, glad you got it going and thanks for posting back up here. I'm working on some new features now, guess I should look at the install before I do any more additions ;)


tripmon

Module Developer
Posted on: 2006/12/19 17:36
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#9

Re: Mx-Directory 3 RC1 Blank page under xoops 2.016

You can try replacing the index.php file with the code below:
Please post back & let me know if it resolves your issue.
<?php
// $Id: index.php,v 3.01 2006/12/15 16:11:06 tripmon Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <https://xoops.org/>  &nbs ... nbsp;   //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
//    Hacks provided by: Adam Frick                                             //
//     e-mail: africk69@yahoo.com                                                 //
//    Purpose: Create a yellow-page like business directory for XOOPS using      //
//    the mylinks module as the foundation.                                     //
// ------------------------------------------------------------------------- //
include_once "header.php";
include_once 
"class/coupon.php";
include_once 
XOOPS_ROOT_PATH."/class/xoopstree.php";

global 
$xoopsDB$xoopsModule$xoopsModuleConfig;

function 
add_header($tpl_source, &$xoopsTpl)
{
    return 
"<?php echo $xoops_module_header; ?>n".$tpl_source;
}

$xoopsOption['template_main'] = 'xdir_index.html';
$xoopsOption['xoops_module_header']= $xoops_module_header;
//cache start
include XOOPS_ROOT_PATH."/header.php";

$xoopsTpl->register_postfilter('add_header');
$xoopsTpl->assign('xoops_module_header'$xoops_module_header);

$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object

$mytree = new XoopsTree($xoopsDB->prefix("xdir_cat"),"cid","pid");

$result=$xoopsDB->query("SELECT cid, title, imgurl FROM ".$xoopsDB->prefix("xdir_cat")." WHERE pid = 0 ORDER BY title") or exit("Error");
//Alpha List
$letters letters();
$xoopsTpl->assign('letters'$letters);
//mid for admin
$xoopsTpl->assign('xmid'$xoopsModule->getVar('mid'));

//iterate from parent ID down
$count 1;
while(
$myrow $xoopsDB->fetchArray($result)) {
    
$imgurl '';
    if (
$myrow['imgurl'] && $myrow['imgurl'] != "http://"){
        
$imgurl $myts->htmlSpecialChars($myrow['imgurl']);
    }
    
$totallink getTotalItems($myrow['cid'], 1);

    
// get child category objects
    
$subcategories '';
    if (
$xoopsModuleConfig['showsubc'] == 1) {
      
$arr = array();
      
$arr $mytree->getFirstChild($myrow['cid'], "title");
      
$space 0;
      
$chcount 0;
      foreach(
$arr as $ele){
          
$chtitle $myts->htmlSpecialChars($ele['title']);
          if (
$chcount 5) {
              
$subcategories .= "...";
              break;
          }
          if (
$space>0) {
              
$subcategories .= ", ";
          }
          
$subcategories .= "<a href="".XOOPS_URL."/modules/" . $xoopsModule->getVar('dirname') . "/viewcat.php?cid=".$ele['cid']."">".$chtitle."</a>";
          
$space++;
          
$chcount++;
      }
  }
    
$xoopsTpl->append('categories', array('image' => $imgurl'id' => $myrow['cid'], 'title' => $myts->htmlSpecialChars($myrow['title']), 'subcategories' => $subcategories'totallink' => $totallink'count' => $count));
    
$count++;
}
//total count
list($numrows) = $xoopsDB->fetchRow($xoopsDB->query("select count(*) from ".$xoopsDB->prefix("xdir_links")." where status>0"));
$xoopsTpl->assign('lang_thereare'sprintf(_MD_THEREARE,$numrows));

$numcols $xoopsModuleConfig['numcols'];
$colwidth floor100 $numcols );
$xoopsTpl->assign('numcols'$numcols);
$xoopsTpl->assign('colwidth'$colwidth);

if (
$xoopsModuleConfig['useshots'] == 1) {
    
$xoopsTpl->assign('shotwidth'$xoopsModuleConfig['logo_maximgwidth']);
    
$xoopsTpl->assign('tablewidth'$xoopsModuleConfig['logo_maximgwidth'] + 10);
    
$xoopsTpl->assign('show_screenshot'true);
    
$xoopsTpl->assign('lang_noscreenshot'_MD_NOSHOTS);
}

if (
$xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
    
$isadmin true;
} else {
    
$isadmin false;
}

$xoopsTpl->assign('lang_description'_MD_DESCRIPTIONC);
$xoopsTpl->assign('lang_lastupdate'_MD_LASTUPDATEC);
$xoopsTpl->assign('lang_hits'_MD_HITSC);
$xoopsTpl->assign('lang_rating'_MD_RATINGC);
$xoopsTpl->assign('lang_ratethissite'_MD_RATETHISSITE);
$xoopsTpl->assign('lang_reportbroken'_MD_REPORTBROKEN);
$xoopsTpl->assign('lang_tellafriend'_MD_TELLAFRIEND);
$xoopsTpl->assign('lang_modify'_MD_MODIFY);
$xoopsTpl->assign('lang_latestlistings' _MD_LATESTLIST);
$xoopsTpl->assign('lang_category' _MD_CATEGORYC);
$xoopsTpl->assign('lang_visit' _MD_VISIT);
$xoopsTpl->assign('lang_comments' _COMMENTS);
$xoopsTpl->assign('lang_attention'_MD_ATTENTION);
$xoopsTpl->assign('lang_phone'_MD_BUSPHONE);
$xoopsTpl->assign('lang_fax'_MD_BUSFAX);
$xoopsTpl->assign('lang_email'_MD_BUSEMAIL);
$xoopsTpl->assign('lang_url'_MD_SITEURL);
//search and alpha display from module preferences
$xoopsTpl->assign('usealpha'$xoopsModuleConfig['usealpha']);
$xoopsTpl->assign('usesearch'$xoopsModuleConfig['usesearch']);
//mid autodetect
$xoopsTpl->assign('xmid'$xoopsModule->getVar('mid'));
//Smarty directory autodetect
$smartydir $xoopsModule->getVar('dirname');
$xoopsTpl->assign('smartydir'$smartydir);

$result $xoopsDB->query("SELECT l.lid, l.cid, l.title, l.address, l.address2, l.city, l.state, l.zip, l.country, l.mfhrs, l.sathrs, l.sunhrs, l.phone, l.fax, l.mobile, l.home, l.tollfree, l.email, l.url, l.logourl, l.submitter, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.premium, t.description FROM ".$xoopsDB->prefix("xdir_links")." l, ".$xoopsDB->prefix("xdir_text")." t WHERE l.status>0 and l.lid=t.lid ORDER BY date DESC"$xoopsModuleConfig['newlinks'], 0);
while(list(
$lid$cid$ltitle$address$address2$city$state$zip$country$mfhrs$sathrs$sunhrs$phone$fax$mobile$home$tollfree$email$url$logourl$submitter$status$time$hits$rating$votes$comments$premium$description) = $xoopsDB->fetchRow($result)) {

//Nice arrays for smarty selects
//include_once "include/functions.php";
$mfhrs ampm($mfhrs);
$sathrs ampm($sathrs);
$sunhrs ampm($sunhrs);
 
$bizhrs = array('1' => _MD_BUSMFHRSSHORT.$mfhrs,'2' => _MD_BUSSATHRSSHORT.$sathrs,'3' => _MD_BUSSUNHRSSHORT.$sunhrs,);
$bnums = array($phone,$fax,$mobile,$home,$tollfree);
$biznums displaybiznums($bnums);

$is_owner = (!empty($xoopsUser) && ($xoopsUser->getvar('uid') == $submitter)) ? '1' null ;

$lvlopts getpremopts($premium);

    if (
$isadmin) {
        
$adminlink '<a href="'.XOOPS_URL.'/modules/' $xoopsModule->getVar('dirname') . '/admin/index.php?op=modLink&amp;lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/' $xoopsModule->getVar('dirname') . '/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
    } else {
        
$adminlink '';
    }
    if (
$votes == 1) {
        
$votestring _MD_ONEVOTE;
    } else {
        
$votestring sprintf(_MD_NUMVOTES,$votes);
    }
    
$path $mytree->getPathFromId($cid"title");
    
$path substr($path1);
    
$path str_replace("/"," - ",$path);
    
$new newlinkgraphic($time$status);
    
$pop popgraphic($hits);
//    $coupon_handler =& xoops_getmodulehandler('coupon', $mydirname);
    
$coupon_handler = new XdirectoryCouponHandler($GLOBALS['xoopsDB']);
    
$coupons $coupon_handler->getCountByLink($lid);

    
$ratingfl = (($rating/2) - floor(($rating/2)) < 0.5) ? intval(floor($rating/2)*10) : intval((floor($rating/2)+.5)*10) ;
    
$ratingfl str_pad($ratingfl2"0"STR_PAD_LEFT);
    
$rating "<img src='".XOOPS_URL."/modules/" $xoopsModule->getVar('dirname') . "/images/ratings/rate"$ratingfl .".gif' alt='"._MD_RATINGC.number_format($rating2)."'/> ";
    
    
$xoopsTpl->append('links', array('id' => $lid'cid' => $cid'url' => $url'rating' => $rating'lvlopts' => $lvlopts'title' => $myts->htmlSpecialChars($ltitle).$new.$pop'address' => $myts->htmlSpecialChars($address), 'address2' => $myts->htmlSpecialChars($address2), 'city' => $myts->htmlSpecialChars($city), 'state' => $myts->htmlSpecialChars($state), 'zip' => $myts->htmlSpecialChars($zip), 'country' => $myts->htmlSpecialChars($country), 'bizhrs' => $bizhrs'biznums' => $biznums'email' => $myts->htmlSpecialChars($email), 'category' => $path'logourl' => $myts->htmlSpecialChars($logourl), 'is_owner' => $is_owner'updated' => formatTimestamp($time,"m"), 'description' => $myts->displayTarea($description,0), 'adminlink' => $adminlink'hits' => $hits'votes' => $votestring'coupons' => $coupons'comments' => $comments'premium' => $premium'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).':  '.XOOPS_URL.'/modules/' $xoopsModule->getVar('dirname') . '/singlelink.php?cid='.$cid.'&lid='.$lid)));

}
//Premium Admin Colors
$xoopsTpl->assign('p1color'$xoopsModuleConfig['premium_listing1col']);
$xoopsTpl->assign('p2color'$xoopsModuleConfig['premium_listing2col']);
$xoopsTpl->assign('p3color'$xoopsModuleConfig['premium_listing3col']);
$xoopsTpl->assign('p4color',$xoopsModuleConfig['premium_listing4col']);
$xoopsTpl->assign('p5color'$xoopsModuleConfig['premium_listing5col']);
include 
XOOPS_ROOT_PATH.'/footer.php';
?>


tripmon

Module Developer
Posted on: 2006/12/12 9:32
tripmon
tripmon (Show more)
Module Developer
Posts: 462
Since: 2004/2/28
#10

Re: Module Template Problem

try updating the mylinks module in admin/modules.



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