31
deka87
Re: Newbb 4.3
  • 2012/8/15 8:30

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Thanks for the work done, irtmfan! Greatly appeciated!



32
deka87
Any smarty plugin to display pm counter in a template?
  • 2012/8/15 6:38

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Hi guys,

As for now I use this in userinfo.php :

le="color: #000000"><?php // ======== Private messages counter ============ $criteria = new CriteriaCompo(new Criteria('read_msg', 0)); $criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid'))); $pm_handler =& xoops_gethandler('privmessage'); $pm_counter = $pm_handler->getCount($criteria); $xoopsTpl->assign( 'pm_counter', $pm_counter );


To render <{pm_counter}> on the profile page. Is there any ready smarty plugin to render the number of pm messages in the theme.html directly?

thanks in advance!



33
deka87
Re: Newbb 4.3
  • 2012/8/14 12:15

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Ok, irtmfan. I will try what I can do or leave it as it is cause this is not such a big issue. Thanks for working on this!



34
deka87
Re: Newbb 4.3
  • 2012/8/14 10:30

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


irtmfan,

le="color: #000000"><?php n**Headers already sent in file "" on line "0"array(7) { [0]=> string(23) "X-Powered-By: PHP/5.3.3" [1]=> string(38) "Expires: Thu, 19 Nov 1981 08:52:00 GMT" [2]=> string(77) "Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0" [3]=> string(16) "Pragma: no-cache" [4]=> string(80) "Set-Cookie: PHPSESSID=a1ff8c1e09713cc85556f1a8e3b813ca; path=/; domain=.test1.ru" [5]=> string(79) "Set-Cookie: newbb_1LV=1344940223; expires=Thu, 13-Sep-2012 10:30:23 GMT; path=/" [6]=> string(23) "Content-type: text/html" }



35
deka87
Re: Newbb 4.3
  • 2012/8/14 7:59

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


No messages but "Thanks for your submission". There are also 4 error messages in debug but they are all about phpmailer.



36
deka87
Re: Newbb 4.3
  • 2012/8/14 5:38

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


irtmfan,

There was a space in the very end of the mainfile.php. I have removed it but it didn't help. Then I put the hack you provided in functions.php and that's what I got then:

Quote:

n**Headers already sent in file "" on line "0"


Also, not sure if I have mentioned it in my first post, I run xoops 2.5.3. Do you think this may cause the issue?



37
deka87
Re: Xoops Form styles
  • 2012/8/13 16:31

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Quote:

In this case you really only need to extend the XoopsForm class as Mamba suggests. You'll just need to create a render() method. You can see ./class/xoopsform/simpleform.php as an example.


Really, it turned out to be that easy. Thanks guys, it's all done now!



38
deka87
Re: Xoops Form styles
  • 2012/8/13 13:34

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


playsome,

Thanks for the work done. The thing is if I touch the core it will affect all my website forms and I only need one of the forms to have custom styling. Seems like it needs some more sophisticated solution.

Quote:

Deka, maybe extending the class will help you. See this tutorial


Thanks for the link, Mamba. I will try it now and report the results.



39
deka87
Re: Newbb 4.3
  • 2012/8/13 11:46

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


<?php /** * System Preloads * * 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. * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Cointin Maxime (AKA Kraven30) * @author Andricq Nicolas (AKA MusS) * @version $Id:$ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); class SystemCorePreload extends XoopsPreloadItem { function eventCoreIncludeFunctionsRedirectheader($args) { global $xoopsConfig; $url = $args[0]; if (preg_match("/[\0-\31]|about:|script:/i", $url)) { if (!preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si', $url)) { $url = XOOPS_URL; } } if (isset($xoopsConfig['redirect_message_ajax']) && $xoopsConfig['redirect_message_ajax']) { $_SESSION['redirect_message'] = $args[2]; header("Location: " . preg_replace("/[&]amp;/i", '&', $url)); exit(); } } function eventCoreHeaderCheckcache($args) { if (!empty($_SESSION['redirect_message'])) { $GLOBALS['xoTheme']->contentCacheLifetime = 0; unset($_SESSION['redirect_message']); } } function eventCoreHeaderAddmeta($args) { if (!empty($_SESSION['redirect_message'])) { $GLOBALS['xoTheme']->addStylesheet('xoops.css'); $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.jgrowl.js'); $GLOBALS['xoTheme']->addScript('', array('type' => 'text/javascript'), ' (function($){ $(document).ready(function(){ $.jGrowl("' . $_SESSION['redirect_message'] . '", { life:3000 , position: "center", speed: "slow" }); }); })(jQuery); '); } } function eventSystemClassGuiHeader($args) { if (!empty($_SESSION['redirect_message'])) { $GLOBALS['xoTheme']->addStylesheet('xoops.css'); $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.jgrowl.js'); $GLOBALS['xoTheme']->addScript('', array('type' => 'text/javascript'), ' (function($){ $(document).ready(function(){ $.jGrowl("' . $_SESSION['redirect_message'] . '", { life:3000 , position: "center", speed: "slow" }); }); })(jQuery); '); unset($_SESSION['redirect_message']); } } } ?>



40
deka87
Xoops Form styles
  • 2012/8/13 11:35

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Hi guys,

There is a xoops form I need to style another way than other xoops forms. HTML of a general form is hardcorded in class/xoopsforum/themeform.php and is a table with an "outer" class. What I need is not a table with different styles but a divs based form with custom styling. I don't want to touch the core. Any ideas how to implement this?

Thanks in advance




TopTop
« 1 2 3 (4) 5 6 7 ... 96 »



Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!