Michaelo's Mods

If you are a MOD Author, post here your MOD Queues.
Forum rules
Each MOD Author is allowed one topic.
In that topic, you can list all of the MOD that you have that are currently in development, and the links to the corresponding forums and/or topics where those MOD(s) are located.

Michaelo's Mods

Postby Michaelo » 05 Apr 2007, 20:46

Just a page holder for some mods I have built (and mods in production). :write:
Current:
    Stargate Portal... The original and the best portal for phpBB 3. (95%)
    User Country Flag... Added to Registration, UCP, Posts, etc... (100%)
    Post bbcode Images II... Replace text buttons in posting with images... complete rework (98%)
    Change Style Changes the style (assuming you have more than one), automatically i.e. not submit needed...
    Hide/Show Anything you like, includes cookie setting and reading...
    Random Logos Random Site Logos. This version allows each themes to have a different set of random logos. (100%)
All the above mods can be found @ http://www.phpbbireland.com/forum/
Latest Additions:

Note code based on functions will be replaced at a later stage with bbcode... (after the phpBB bbcode updates are complete).
Function based updates:
    [you] Function... Replaces [you] with the 'viewers username' in posts. Acts like a bbcode, draw the attention of the member to something...
    [far] Function... Finds and Replaces key words in post with pre-determined text (acronym)

Mike
Stargate Portal (Dev Site) phpBB 3.0.9 version II 99%.
Kiss Portal Engine (Dev Site) phpBB 3.0.10 99%.
User avatar
Michaelo    
Supporter
Supporter
 
Posts: 342
Joined: 17 Sep 2006, 09:02
Location: Dublin, Ireland
Favorite Team: Miami Dolphins
Gender: Male
phpBB Knowledge: 9




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Michaelo's Mods

Postby Handyman » 05 Apr 2007, 21:32

to make it easy on you, the real name can be a custom profile field? it's really easy to do in phpBB3 and you can make it required on registration.
As for the others Good
Sniper has already used the post bbcode images on sniper_pro
Looks great Good
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7456
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Michaelo's Mods

Postby Michaelo » 06 Apr 2007, 18:45

Thanks Handyman, I will use the custom profile field for the Real name, have updated the Post bbcode Images for the prosilver... including a few more images... wonder if Sniper has them... must look...

Question... Have you come across any code to change styles in the most recent code changes? I seem to remember there was at least on reference to it but I can't find anywhere it is being used...
Mike
Stargate Portal (Dev Site) phpBB 3.0.9 version II 99%.
Kiss Portal Engine (Dev Site) phpBB 3.0.10 99%.
User avatar
Michaelo    
Supporter
Supporter
 
Posts: 342
Joined: 17 Sep 2006, 09:02
Location: Dublin, Ireland
Favorite Team: Miami Dolphins
Gender: Male
phpBB Knowledge: 9

Re: Michaelo's Mods

Postby Highway of Life » 06 Apr 2007, 19:12

Michaelo wrote:Question... Have you come across any code to change styles in the most recent code changes? I seem to remember there was at least on reference to it but I can't find anywhere it is being used...
Mike
I?m not sure what you are asking here.
Are you trying to find out what template changes have been made since Beta5?
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Michaelo's Mods

Postby Michaelo » 06 Apr 2007, 20:19

In the new prosilver template there is mention of a change style somewhere in the code... It would appear even if it is not currently being employed it will be at a later stage... I can't for the life of me find the code reference now... could also be in an updated php file... oh for a memory Smile
Stargate Portal (Dev Site) phpBB 3.0.9 version II 99%.
Kiss Portal Engine (Dev Site) phpBB 3.0.10 99%.
User avatar
Michaelo    
Supporter
Supporter
 
Posts: 342
Joined: 17 Sep 2006, 09:02
Location: Dublin, Ireland
Favorite Team: Miami Dolphins
Gender: Male
phpBB Knowledge: 9

Re: Michaelo's Mods

Postby Handyman » 06 Apr 2007, 20:34

Michaelo wrote:In the new prosilver template there is mention of a change style somewhere in the code... It would appear even if it is not currently being employed it will be at a later stage... I can't for the life of me find the code reference now... could also be in an updated php file... oh for a memory Smile

you're talking about the styleswitcher.js that they recently put there? I can't find where it's actually used except for text resizing.
There is a lot of stuff in there that doesn't seem to do much Nea
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7456
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Michaelo's Mods

Postby Sniper_E » 06 Apr 2007, 21:25

Is that the little A in the right of the breadcrumb? That button does nothing for me.
That button needs to be a little S which would switch you through the different styles on a forum.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6985
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Michaelo's Mods

Postby Michaelo » 06 Apr 2007, 22:19

Handyman that's the one... (thanks!) Perhaps they are going to provide a switch which will allow changing stylesheets for minor variations... Actually this could do the same thing as changing a complete style are all styles are css based...

Sniper, the little A should change your font size if even a little... barley noticeable on mine Smile
Stargate Portal (Dev Site) phpBB 3.0.9 version II 99%.
Kiss Portal Engine (Dev Site) phpBB 3.0.10 99%.
User avatar
Michaelo    
Supporter
Supporter
 
Posts: 342
Joined: 17 Sep 2006, 09:02
Location: Dublin, Ireland
Favorite Team: Miami Dolphins
Gender: Male
phpBB Knowledge: 9

Re: Michaelo's Mods

Postby Michaelo » 06 Apr 2007, 23:46

Change Style Code:
Require no submit button... just select from drop down list and that's it. Normally this code is in a block, but you can place it in the index.php...

The php file...
Spoiler:
Code: Select all
<?php
/***************************************************************************
*                           block_style_select.php
*                            -------------------
*   begin                : Saturday, Jan 21, 2005
*   copyright            : (C) 2005 Michaelo - Michael O'Toole
*   website              : http://www.phpbbireland.com
*   email                : admin@phpbbireland.com
*   Notes                : Cut down version for default install
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
}


   if($user->data['username'] == 'Anonymous') // Anonymous users can't select a style...
      return;

   // not all the following globals are reuired but I'm lazy...
   global $user_id, $user, $template, $lang, $board_config, $phpbb_root_path, $db;
      
   $current_style = $user->data['user_style'];      // the current style
   $new_style = request_var('STYLE_URL', '');      // selected style
   $user_id = $user->data['user_id'];            // get user id
   
   $style = $new_style = ($config['override_user_style']) ? $config['default_style'] : $new_style; // allowed style change ? //
      
   if($new_style != '' && $new_style != $current_style) // skip or change to new style when necessary //
   {
      $sql = 'UPDATE ' . USERS_TABLE . '
         SET user_style = ' . $new_style . "
         WHERE user_id = $user_id";
      $db->sql_query($sql);
   }
         
   if ($style == 0)
   {
      $sql = "SELECT theme_id
            FROM " . STYLES_THEME_TABLE . "
            WHERE theme_name = '$style'";
      if( $result = $db->sql_query($sql) )
      {
         $style = $row['theme_id'];
      }
   }
      
   // collect all data...
   
   $sql = 'SELECT t.theme_id, t.theme_name, t.theme_status, s.style_id, s.style_active
      FROM ' . STYLES_THEME_TABLE . ' t, ' . STYLES_TABLE . " s
      WHERE t.theme_id = s.style_id AND s.style_active != 0
      ORDER BY t.theme_name";
      
   if(!$result = $db->sql_query($sql))
   {
      echo 'Error... # 67'; // my error reference //
   }
   
   $select_theme = "<select onChange=\"this.form.submit();\" name=\"STYLE_URL\" class=\"gen\">\n";
   
   while( $row = $db->sql_fetchrow($result) )
   {
      $selected = ($row['theme_id'] == $style) ? " selected=\"selected\"" : "";
      $row['theme_name'] = k_checksize($row['theme_name'],14);       // function to stop page from stretching due to long names in form select options//
      $select_theme .= "<option class=" . $class . " value=\"" . $row['theme_id'] . "\"$selected>" . $row['theme_name'] . "</option>";
   }
   $select_theme .= "</select>\n";
   
   $select_theme_ok = 'Please login to use Style Select block.'; //$user->lang['LOGIN_NOTIFY_FORUM']; //add lang key later...   'STYLE_SELECT_ALLOW'     => 'Allow style change',    
   
   $select_allow = true; // addd option to portal/config if required...
   
   $template->assign_vars(array(
      'S_SELECT_ALLOW'   => $select_allow,
      'S_SELECT_STYLE' => $select_theme,
      'S_STATUS' => $status,
      )
   );
?>


html code...
Spoiler:
Code: Select all
<form action="page_containing_the_above-code.php" method="post">
<table class="*" width="100%" cellpadding="0" cellspacing="0" border="0">
   <td>
      <tr>
         <td class="" width="100%" align="center"><span class="*">{L_SELECT_STYLE}</td>
      </tr>
      <tr>
         <td align="center">{S_SELECT_STYLE}</td>
      </tr>
   </td>
</table><input type="hidden"  name="change" value="CHANGE" /> 
</form>


Replace * with whatever class suits...
Additional functions required.
Code: Select all
function k_checksize($txt,$len)
{
   if( strlen($txt) > $len)
   {
      $temp = $txt;
      $temp = substr($txt,0,$len);
      $temp .= '...';
      $txt = $temp;
   }      
   return($txt);
}

Mike
Stargate Portal (Dev Site) phpBB 3.0.9 version II 99%.
Kiss Portal Engine (Dev Site) phpBB 3.0.10 99%.
User avatar
Michaelo    
Supporter
Supporter
 
Posts: 342
Joined: 17 Sep 2006, 09:02
Location: Dublin, Ireland
Favorite Team: Miami Dolphins
Gender: Male
phpBB Knowledge: 9

Post bbcode Images

Postby Michaelo » 07 Apr 2007, 00:07

I will add/update all images here and code to swap them... (place holder only)

Attached some more images...
Attachments
bbcode_image_latest.jpg
How they look... note the help text display on mouse-over.
bbcode.rar
(14.77 KiB) Downloaded 124 times
bold_ro.gif
bold_ro.gif (528 Bytes) Viewed 3804 times
Stargate Portal (Dev Site) phpBB 3.0.9 version II 99%.
Kiss Portal Engine (Dev Site) phpBB 3.0.10 99%.
User avatar
Michaelo    
Supporter
Supporter
 
Posts: 342
Joined: 17 Sep 2006, 09:02
Location: Dublin, Ireland
Favorite Team: Miami Dolphins
Gender: Male
phpBB Knowledge: 9

Next

Return to MOD Author Queues

Who is online

Users browsing this forum: No registered users and 3 guests