Jump to content
DevFuse Forums

ShaneV

Members
  • Content Count

    47
  • Joined

  • Last visited

About ShaneV

  • Rank
    Advanced Member

Previous Fields

  • IP.Board Version
    IPB 3.0.x

Profile Information

  • Gender
    Male
  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. ShaneV

    Login form but need a check done

    Sounds interesting MPFF ;) Any idea when? Maybe its more usefull to me then IPBSDK.
  6. 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
  7. ShaneV

    Custome Pages...

    You can use IP.Content ;)
  8. 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 ); }
  9. ShaneV

    Task locks itself after run

    Yeah maybe thats better :) working fine now ;)
  10. 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 ); } }
  11. 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
  12. 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.
  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. 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.
  15. 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.
×