Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
hanver
New Member
New Member



Joined: Apr 26, 2012
Posts: 14

PostPosted: Thu May 03, 2012 5:18 am Reply with quote

Hello

there is this Pro Forms for the current version of RN? Or should this be updated once? Or is there a similar module as per Forms?

If it is allowed, I would find a programmer of such a module created for a small payment if it is created according to my wishes

creating: a Join Us Modul with my Ideas..
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Thu May 03, 2012 6:01 am Reply with quote

You can try this Members Application module.
[ Only registered users can see links on this board! Get registered or login! ]

You just need to run the installer and you should be able to create the members application forms from the admin.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
hanver







PostPosted: Fri May 04, 2012 6:03 am Reply with quote

thx for help very nice... but the next quest...

i seach for rn 2.5 a image resize with board 2.0.23. can you help me too?
 
nuken







PostPosted: Fri May 04, 2012 6:16 am Reply with quote

Try this on a test site first, make sure you back up any file you edit. It should work but I have not tested it.

Code:


#
#-----[ SQL ]------------------------------------------
#

INSERT INTO rnuke_bbconfig( config_name, config_value ) VALUES ( 'postimg_width', '450' );
INSERT INTO rnuke_bbconfig( config_name, config_value ) VALUES ( 'postimg_height', '300' );

#
#-----[ OPEN ]------------------------------------------
#

includes/bbcode.php

#
#-----[ FIND ]------------------------------------------
#

$bbcode_tpl = null;

#
#-----[ AFTER, ADD ]------------------------------------------
#

// mod img size add
function makeimgsize ( $width, $height )
{
   global $board_config;
   
   $size = '';
   
   // check for smallness
   if ( $width < $board_config['postimg_width'] && $height < $board_config['postimg_height'] )
   {
      return 'SMALL';
   }
   elseif ( $width > $height )
   {
      if ( $board_config['postimg_width'] < $width )
      {
         $size = 'width="' . $board_config['postimg_width'] . '"';
      }
   }else
   {
      if ( $board_config['postimg_height'] < $height )
      {
         $size = 'height="' . $board_config['postimg_height'] . '"';
      }
   }
   
   return $size;
}

function image_parse ( $post, $uid )
{
   global $board_config, $lang, $bbcode_tpl;

   preg_match_all( "/\[img(.*?):$uid\](.*?)\[\/img:$uid\]/i", $post, $matches);
   foreach ( $matches[0] as $i => $img )
   {
      $stuff = $matches[1][$i];
      $stuff = explode( ':', $stuff );
      if ( count( $stuff ) != 4 )
      { // old image or something
         $post = preg_replace( "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i", $bbcode_tpl['img'], $post );
      }
      switch($stuff[0])
      {
         case '=right':
            $align = $lang['RIGHT'];
            break;
         case '=center':
            $align = 'center';
            break;
         case '=left':
              default:
            $align = $lang['LEFT'];
         break;
      }
      $width = $stuff[1];
      $height = $stuff[2];
      $size = makeimgsize( $width, $height );
       
      if ( $size != 'SMALL' )
      {
         $replace = $bbcode_tpl['thmbimg'];
         $seek = array( '{IMAGE}', '{WIDTH}', '{HEIGHT}', '{SIZE}', '{NOTICE}', '{ALIGN}' );
         $with = ( !empty( $size ) ) ? array( $matches[2][$i] , $width, $height, $size, $lang['postimg_clickme'], $align ) : array( $matches[2][$i] , $width, $height, $size, '', $align );
         $replace = str_replace( $seek, $with, $replace );
      }
      else
      {
         $replace = str_replace( '\1', $matches[2][$i], $bbcode_tpl['img'] );
      }
      $post = str_replace( $img, $replace, $post );
   }
       
   return $post;
}
// mod img size end

#
#-----[ FIND ]------------------------------------------
#

$patterns[] = "#\[img:$uid\]([^?](?:[^\[]+|\[(?!url))*?)\[/img:$uid\]#i";

#
#-----[ BEFORE, ADD ]------------------------------------------
#

// mod img size replace with call to image parsing function
$text = image_parse ( $text, $uid );

#
#-----[ FIND ]------------------------------------------
#

$text = preg_replace("#\[img\]

#
#-----[ BEFORE, ADD ]------------------------------------------
#

   // mod max img size changed the first pass thingo
   preg_match_all( "#\[(img.*?)\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", $text, $matches );
   // now we go through these matches and do what's needed
   foreach ( $matches[0] as $i => $m )
   {
      // easier use
      $tag = $matches[1][$i];
      $url1 = $matches[2][$i];
      $url2 = $matches[4][$i];
       
      // if we already tagged this one then we leave it be ;)
      preg_match( '#img.*?:(\d+):(\d+)#i', $tag, $match );
      if ( empty( $match ) )
      {
         // get the size so we can store it
         if ( !$size = @getimagesize( $url1 . $url2 ) )
         { // image will not get resized
            $width = '';
            $height = '';
         }
         else
         {
            $width = $size[0];
            $height = $size[1];
         }
      }
      else
      { // we already have the size
         $width = $match[1];
         $height = $match[2];
      }
      $tag = explode( ':', $tag ); // remove any possible left over : stuff
      $tag = $tag[0];
      // lastly we replace it within the text
      $text = str_replace( $m, '[' . $tag . ':' . $width . ':' . $height . ':' . $uid . ']' . $url1 . $url2 . '[/img:' . $uid . ']', $text );
   }

#
#-----[ IN-LINE FIND ]------------------------------------------
#

$text

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#

//

#
#-----[ AFTER, ADD ]------------------------------------------
#

// end mod img size changes

#
#-----[ OPEN ]------------------------------------------
#

modules/Forums/admin/admin_board.php

#
#-----[ FIND ]------------------------------------------
#

$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : "";

#
#-----[ AFTER, ADD ]------------------------------------------
#

// mod img size add
$postimg_width = $new['postimg_width'];
$postimg_height = $new['postimg_height'];
// mod img size end

#
#-----[ FIND ]------------------------------------------
#

"L_RESET" => $lang['Reset'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

// mod img size add
"L_POSTIMG_SIZE" => $lang['postimg_size'],
"POSTIMG_WIDTH" => $postimg_width,
"POSTIMG_HEIGHT" => $postimg_height,
// mod img size end

#
#-----[ OPEN ]------------------------------------------
#
themes/Your Theme/forums or
templates/subSilver/bbcode.tpl

#
#-----[ FIND ]------------------------------------------
#

<!-- END email -->

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- BEGIN thmbimg -->
<div align="{ALIGN}">
 <table border="0">
  <tr>
   <td><img src="{IMAGE}" align="center" border="0" {SIZE}  onclick="window.open( '{IMAGE}', 'imgpop',  'width={WIDTH},height={HEIGHT},status=no,toolbar=no,menubar=no' );return false" /></td>
  </tr>
  <tr>
   <td align="center" class="gensmall"><i>{NOTICE}</i></td>
  </tr>
 </table>
</div>
<!-- END thmbimg -->

#
#-----[ OPEN ]------------------------------------------
#

modules/Forums/templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#

   <tr>
      <td class="row1">{L_ENABLE_PRUNE}</td>
      <td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}  <input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
   </tr>
   
#
#-----[ AFTER, ADD ]------------------------------------------
#

   <tr>
      <td class="row1">{L_POSTIMG_SIZE}</td>
      <td class="row2"><input type="text" size="5" maxlength="5" name="postimg_width" value="{POSTIMG_WIDTH}" /> X <input type="text" size="5" maxlength="5" ame="postimg_height" value="{POSTIMG_HEIGHT}" /></td>
   </tr>

#
#-----[ OPEN ]------------------------------------------
#

modules/Forums/language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

// mod img size add
$lang['postimg_clickme'] = 'Thumbnail, click to enlarge.';
   
#
#-----[ OPEN ]------------------------------------------
#

modules/Forums/language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

// mod img size add
$lang['postimg_size'] = 'Maximum size of images in posts';

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
 
hanver







PostPosted: Thu May 10, 2012 6:13 pm Reply with quote

it is not work .-(
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©