Jump to content
DevFuse Forums

ShaneV

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by ShaneV

  1. Same here for June ;) Cant wait to use the new version :thumbsup:
  2. For IPB2.3 i had a mod that every user was required to fill in there gender and birthday when registration. How is this possible for IPB3? Thanks Shane
  3. Hi, i need to know if it possible? I have secured my server with ssl but when i access IPB images w'ont load and every url on the board is http. Greetz
  4. Sounds interesting MPFF ;) Any idea when? Maybe its more usefull to me then IPBSDK.
  5. Hi thanks Michael, Query's looks like this now: Wont reset to zero but also not increasing the count for topic count and user post count. $this->DB->insert( 'posts', array( 'author_id' => $reply_author, 'author_name' => $reply_author_name, 'ip_address' => '127.0.0.1', 'post_date' => $time_stamp, 'post' => $tmessage, 'topic_id' => $this->topic['tid'] , ) ); $this->DB->update( 'topics', array( 'last_poster_id' => $reply_author, 'last_post' => $time_stamp, 'last_poster_name' => $reply_author_name['name'] ), 'tid=' . $this->topic['tid'] ); $this->DB->update( 'topics', 'posts=posts+1', 'tid=' . $this->topic['tid'], true, false ); $this->DB->update( 'members', 'posts=posts+1', 'member_id=' . $reply_author, true, false ); I'm i still doing something wrong? Grtz Shane
  6. Hi, I'm making an addon for my mods and everything working fine but i have one problem. When a mod use it his postcount resets to 0 and also the reply count of the topic. But i really cant see the problem or solution :p Piece of the cake :p if($this->request['postREPLY'] == 'y') { $reply_author = "".$_COOKIE['member_id'].""; $reply_author_name = $this->DB->buildAndFetch( array( 'select' => 'name', 'from' => 'members', 'where' => "member_id={$reply_author}") ); $time_stamp = time(); $mod_message = $this->request['reason']; $search = array( "/%topic_title%/", "/%topic_link%/", "/%reason_note%/" ); $replace = array( $this->topic['title'], "[url='{$this->settings['board_url']}/index.php?showtopic={$this->topic['tid']}']{$this->settings['board_url']}/index.php?showtopic={$this->topic['tid']}[/url]", $mod_message ); $tmessage = $this->settings['bs_advancedmodtools_disapprove_tm']; $tmessage = str_replace("\n", "<br />", $tmessage ); $tmessage = preg_replace( $search, $replace, $tmessage ); $this->DB->insert( 'posts', array( 'author_id' => $reply_author, 'author_name' => $reply_author_name, 'ip_address' => '127.0.0.1', 'post_date' => $time_stamp, 'post' => $tmessage, 'topic_id' => $this->topic['tid'] , ) ); $this->DB->update( 'topics', array( 'posts' => 'posts+1', 'last_poster_id' => $reply_author, 'last_post' => $time_stamp, 'last_poster_name' => $reply_author_name['name'] ), 'tid=' . $this->topic['tid'] ); $this->DB->update( 'members', array( 'posts' => 'posts+1' ), 'member_id=' . $reply_author ); }
  7. Yeah maybe thats better :) working fine now ;)
  8. Hi, i added $this->class->unlockTask( $this->task ); but it stil locks after it runs. Full page: <?php /** * Underscore title replacer for IPB3.x **/ if ( ! defined( 'IN_IPB' ) ) { print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } class task_item { /** * Parent task manager class * * @access protected * @var object */ protected $class; /** * This task data * * @access protected * @var array */ protected $task = array(); /** * Registry Object Shortcuts */ protected $registry; protected $settings; /** * Constructor * * @access public * @param object ipsRegistry reference * @param object Parent task class * @param array This task data * @return void */ public function __construct( ipsRegistry $registry, $class, $task ) { /* Make registry objects */ $this->registry = $registry; $this->settings =& $this->registry->fetchSettings(); $this->class = $class; $this->task = $task; } /** * Run this task * * @access public * @return void */ public function runTask() { //----------------------------------------- // ATTEMPT TO CONNECT TO DB //----------------------------------------- $con = mysql_connect($this->settings['sql_host'], $this->settings['sql_user'], $this->settings['sql_pass']) or die('Could not connect: ' . mysql_error()); mysql_select_db($this->settings['sql_database'], $con); //----------------------------------------- // REPLACE '_' WITH ' ' IN ALL TITLES //----------------------------------------- mysql_query("UPDATE " . $this->settings['sql_tbl_prefix'] . "topics SET title=REPLACE(title, '_', ' ')"); mysql_close($con); //-------------------------------------------------- // UNLOCK TASK, CLOSE DB CONNECTION AND CLEAR MEMORY //-------------------------------------------------- mysql_query("UPDATE " . $this->settings['sql_tbl_prefix'] . "task_manager SET task_locked=0 WHERE task_id=24"); mysql_close($con); unset($con,$this->settings,$this->registry,$this->task); $this->class->unlockTask( $this->task ); } }
  9. Hi i needed something similar :) This post helped me out. http://www.devfuse.com/forums/topic/3731-login-form-but-need-a-check-done/page__view__findpost__p__10558
  10. Hi, I have this simple task and it replace all underscores but for some reason the task locks itself and wont run again. public function runTask() { //----------------------------------------- // ATTEMPT TO CONNECT TO DB //----------------------------------------- $con = mysql_connect($this->settings['sql_host'], $this->settings['sql_user'], $this->settings['sql_pass']) or die('Could not connect: ' . mysql_error()); mysql_select_db($this->settings['sql_database'], $con); //----------------------------------------- // REPLACE '_' WITH ' ' IN ALL TITLES //----------------------------------------- mysql_query("UPDATE " . $this->settings['sql_tbl_prefix'] . "topics SET title=REPLACE(title, '_', ' ')"); mysql_close($con); //-------------------------------------------------- // UNLOCK TASK, CLOSE DB CONNECTION AND CLEAR MEMORY //-------------------------------------------------- mysql_query("UPDATE " . $this->settings['sql_tbl_prefix'] . "task_manager SET task_locked=0 WHERE task_id=24"); mysql_close($con); unset($con,$this->settings,$this->registry,$this->task); } If i check table task_manager i see the task has a date stamp in the cell task_locked. All i want is that the task will not locks itself, i want it to runs every 24 hours (but now i have to unlock it every time) Sorry for the bad English, hope someone can help.
  11. Thanks for editing the query :thumbsup: works fine now, also now i know what i did wrong :)
  12. Thanks <if test="$this->settings['...']"> did the work :) @Sacred, was for a mod i want to create myself and that code was from a older IPB2.3.x mod ;) thanks anyway.
  13. I gonne try to explain it the best i can, my english is not that good. What i want? A list of user that have the most topics in 1 or more category's that i setup in ACP I have made this query but always get an 500 internal server error, so error from IPB i have one error but meanwhile the query has changed a bit. The query $this->DB->build( array( 'select' => 't.*, COUNT( t.starter_id ) as starter_total', 'from' => array('topics' => 't'), 'limit' => array( 0, $this->settings['bs_advancedstats_01_showitems'] ), 'order' => 'starter_total DESC', 'add_join' => array( array( 'select' => 'm.member_id, m.members_display_name, m.member_group_id, m.members_seo_name', 'from' => array( 'members' => 'm' ), 'type' => 'left' ), ) 'where' => 't.forum_id IN(' . $this->settings['bs_advancedstats_01_fora'] . ') AND m.member_id=t.starter_id GROUP BY (t.starter_id)' ) ); Is it also possible to use the starter_total as a variable for like in a template? Date: Sat, 16 Jan 2010 21:43:59 +0000 Error Number: 1064 Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY starter_total DESC LIMIT 0,15' at line 1 IP Address: 87.65.163.204 Page: /private/index.php?app=advancedstats&getContent=01 Debug: array ( 1 => array ( 'file' => '/home/**net/**.net/private/ips_kernel/classDb.php', 'line' => 1019, 'function' => 'query', 'class' => 'db_driver_mysql', ), 3 => array ( 'file' => '/home/**net/**.net/private/admin/sources/base/ipsController.php', 'line' => 291, 'function' => 'doExecute', 'class' => 'public_advancedstats_advancedstatsmod_advancedstatssec', ), ) mySQL query error: SELECT t.*, COUNT( t.starter_id ) as starter_total,m.member_id, m.members_display_name, m.member_group_id, m.members_seo_name,t FROM ibf_topics t LEFT JOIN ibf_members m ORDER BY starter_total DESC LIMIT 0,15 I'm learning allot but don't now how to fix it.
  14. Hi, thanks for helping, i found it. It was a mod called EN30 Top X Stats that caused the issue. By disabling it the problem was gone.
  15. Hi i want to check if a setting is on or off and that a membergroup has access. in IPB2.3 i did that like this: <if="$this->settings['...'] == 1"> <if="in_array( $this->ipsclass->member['mgroup'] , explode(',' ,$this->ipsclass->vars['...']) )"> How can i do this for IPB3? I try d like this but doesn't work <if="$this->settings['srd23_ft_on'] == 1"> ..
  16. All error logs are in /cache/ but the 500 error won't show in the logs. I have a installed +- 15 mods, is it possible that a mode makes this error? i find it strange that in firefox it is a blank page, and in IE a 500 error.
  17. Hi, Nope not working, also if i remove my code edit and upload it i still have the issue.
  18. Hi, now i notice that in firefox the page is blank, in IE i get an http500 server error.
  19. Hi, I recently upgraded from 2.3.6 to 3.0.5, everything is working fine but.. When i change skin to lo-fi of any other skin i install i get a blank screen on the index page, when i typ a url to a topic, profile or anything else thats working fine. i made only one little edit to the index page <?php /** * Invision Power Services * IP.Board v3.0.5 * Main public executable wrapper. * Set-up and load module to run * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @license http://www.invisionpower.com/community/board/license.html * @package Invision Power Board * @link http://www.invisionpower.com * @version $Rev: 3887 $ * */ $g_reg = $_GET['section']; if(isset($_COOKIE['member_id']) AND $_COOKIE['member_id'] != "0" OR $g_reg == "register" AND $_COOKIE['member_id'] == "0" OR $_COOKIE['member_id'] == "") { define( 'IPB_THIS_SCRIPT', 'public' ); require_once( './initdata.php' ); require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' ); require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' ); ipsController::run(); exit(); } else { header("Location: ../index.php"); exit(); } Anyone has any idea how to fix this issue? Greetz
  20. Thanks for the information :) working fine now.
  21. Hi, thanks for the example Michael. I'm looking for something like this for IPB 2.3 can you help me?
  22. Hi thanks Michael, can you give me an example how to use it in the templates with an is_array if statement. This is my first time with ipb3 code, only have some basic php skills. Thanks, grtz
  23. If i do it both ways i get the same error without a query result Warning: Invalid argument supplied for foreach() in /home/bsnet/public_html/Upgrader/admin/sources/classes/output/publicOutput.php(1381) : eval()'d code on line 30 Warning: Cannot modify header information - headers already sent by (output started at /home/bsnet/public_html/Upgrader/admin/sources/classes/output/publicOutput.php(1381) : eval()'d code:30) in /home/bsnet/public_html/Upgrader/admin/sources/classes/output/formats/html/htmlOutput.php on line 91 Warning: Cannot modify header information - headers already sent by (output started at /home/bsnet/public_html/Upgrader/admin/sources/classes/output/publicOutput.php(1381) : eval()'d code:30) in /home/bsnet/public_html/Upgrader/admin/sources/classes/output/formats/html/htmlOutput.php on line 94 Warning: Cannot modify header information - headers already sent by (output started at /home/bsnet/public_html/Upgrader/admin/sources/classes/output/publicOutput.php(1381) : eval()'d code:30) in /home/bsnet/public_html/Upgrader/admin/sources/classes/output/formats/html/htmlOutput.php on line 102 Warning: Cannot modify header information - headers already sent by (output started at /home/bsnet/public_html/Upgrader/admin/sources/classes/output/publicOutput.php(1381) : eval()'d code:30) in /home/bsnet/public_html/Upgrader/admin/sources/classes/output/formats/html/htmlOutput.php on line 103 Warning: Cannot modify header information - headers already sent by (output started at /home/bsnet/public_html/Upgrader/admin/sources/classes/output/publicOutput.php(1381) : eval()'d code:30) in /home/bsnet/public_html/Upgrader/admin/sources/classes/output/formats/html/htmlOutput.php on line 107 Full page: <?php if ( ! defined( 'IN_IPB' ) ) { print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } class public_top50_top50mod_top50sec extends ipsCommand { public function doExecute( ipsRegistry $registry ) { /* Load language */ $this->registry->class_localization->loadLanguageFile( array( 'public_top50' ), 'core' ); $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_top50' ) ); /* Page Title */ if( $this->page_title == "" ) { $this->page_title = $this->settings['board_name'] . " - " . $this->lang->words['title']; } $this->registry->output->setTitle( $this->page_title ); /* Navigation */ $this->registry->output->addNavigation( $this->lang->words['title'], 'app=top50&module=top50mod' ); /* App Online Check */ if( !$this->settings['bs_top50_online'] ) { $this->registry->output->showError( 'top50_offline' ); } /* Group Permissions */ if( !$this->memberData['bs_top50_groups'] ) { $this->registry->output->showError( 'top50_groupPrem' ); } /* There must be at least one forum selected */ if( !$this->settings['bs_top50_forums'] ) { $this->registry->output->showError( 'top50_noForums' ); } /* Test foreach in ipb3 template */ $data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members','limit' => '50' ) ); /* Skin bit */ $this->output .= $this->registry->output->getTemplate('top50')->showTop50( $data ); /* Output */ $this->registry->output->addContent( $this->output ); $this->registry->output->sendOutput(); } }
×
×
  • Create New...