Jump to content
DevFuse Forums

ShaneV

Members
  • Content count

    47
  • Joined

  • Last visited

Everything posted by ShaneV

  1. ShaneV

    IPB 3.1 Donation Tracker v3

    Same here for June ;) Cant wait to use the new version :thumbsup:
  2. ShaneV

    Login form but need a check done

    @MPFF, any news yet? :)
  3. 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
  4. ShaneV

    IPB with SSL

    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
  5. 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 ); }
  6. ShaneV

    Login form but need a check done

    Sounds interesting MPFF ;) Any idea when? Maybe its more usefull to me then IPBSDK.
  7. ShaneV

    Custom edit mod tools

    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
  8. ShaneV

    Custome Pages...

    You can use IP.Content ;)
  9. ShaneV

    Task locks itself after run

    Yeah maybe thats better :) working fine now ;)
  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. ShaneV

    Task locks itself after run

    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 ); } }
  12. ShaneV

    External Login

    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
  13. ShaneV

    Count and Group by in IPB query

    Thanks for editing the query :thumbsup: works fine now, also now i know what i did wrong :)
  14. 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.
  15. ShaneV

    If else in IPB3

    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.
  16. ShaneV

    If else in IPB3

    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"> ..
  17. ShaneV

    Skin problems

    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.
  18. ShaneV

    Skin problems

    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
  19. ShaneV

    Skin problems

    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.
  20. ShaneV

    Skin problems

    Hi, Nope not working, also if i remove my code edit and upload it i still have the issue.
  21. ShaneV

    Skin problems

    Hi, now i notice that in firefox the page is blank, in IE i get an http500 server error.
  22. ShaneV

    Login form but need a check done

    Thanks for the information :) working fine now.
  23. ShaneV

    Login form but need a check done

    Hi, thanks for the example Michael. I'm looking for something like this for IPB 2.3 can you help me?
  24. ShaneV

    Custom script

    Hi, I recently upgraded my 2.3.5 to 3.0.3 :) Now for 2.3xx i made my own little script called 'Topic Top 50' It shows 50 topics with most reply's that where post in the last 30 days.. With a simple code: http://codedump.mastercode.nl/645/ Placed the file in /sources/components_public/ and access it by index.php?autocom=top50 Now i see that in IPB3 almost everything with the code is changed, how can i do something like this for IPB3? Thanks allot! Greetz
  25. ShaneV

    Custom script

    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
×