phpBBHacks.com - Writing hacks in MODX format
Bad Boy Blog, an unofficial Diddy and Bad Boy fan blog
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Writing hacks in MODX format
Goto page 1, 2  Next
 
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 3 Hack Requests and Development
 See a User Guidelines violation? Please contact us.
Author Message

~HG~
Dedicated User

Joined: 08 Nov 2003
Posts: 3913
Location: Australia

PostPosted: April 21st 2009, 1:20 am    Post subject: Writing hacks in MODX format Reply with quote

Can someone please give me a tutorial on how to write hacks using the phpBB3 MODX .xml files?

I have spent many hours searching phpbb.com and googling but I have yet to find instructions on how to create a MODX hack.
_________________
~HG~

|| rodneyangell.com || || phpbb-tutorials.com ||My Hacks
Back to top
View user's profile Send private message Send e-mail Visit poster's website

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: April 21st 2009, 12:51 pm    Post subject: Reply with quote

Hello ~HG~,

Does anything here help? http://www.phpbb.com/mods/modx/ - I'm guessing you may have already found that page, but I figured that it couldn't hurt.

Thanks,

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger

~HG~
Dedicated User

Joined: 08 Nov 2003
Posts: 3913
Location: Australia

PostPosted: April 21st 2009, 10:50 pm    Post subject: Reply with quote

Thats the first place I looked Patrick.

There is plenty on how to install MODX files but nothing that I can find in relation to writing hacks in .xml format so hopefully one of our own hack authors will be kind enough to put together an easy to follow tutorial so that novice's like myself and other's can interpret and use as part of our knowledge of phpbb.
_________________
~HG~

|| rodneyangell.com || || phpbb-tutorials.com ||My Hacks
Back to top
View user's profile Send private message Send e-mail Visit poster's website

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: April 22nd 2009, 11:18 am    Post subject: Reply with quote

Sorry.

And yeah, I'd love to see that. I may see if I can ask one...

Thanks,

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger

~HG~
Dedicated User

Joined: 08 Nov 2003
Posts: 3913
Location: Australia

PostPosted: April 22nd 2009, 11:31 pm    Post subject: Reply with quote

Thanks Patrick.

This would be very handy for many people who use phpbb
_________________
~HG~

|| rodneyangell.com || || phpbb-tutorials.com ||My Hacks
Back to top
View user's profile Send private message Send e-mail Visit poster's website

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: April 23rd 2009, 10:02 am    Post subject: Reply with quote

My pleasure. Agreed.

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger

MilkHub
New User

Joined: 21 Apr 2009
Posts: 13
Location: England

PostPosted: April 23rd 2009, 10:25 am    Post subject: Reply with quote

I think the most useful things you can get from phpbb.com are the "Sample MODX File" (below "files" on the above linked page) and then the "Format Description" on the left of that too.

If you view the source of the Sample MODX file you'll see they've created a simple template with the most common actions you'll need in your mod. You can then use the format description as a complete reference of everything you can do... it's not the easiest document to read but once had a look through the sample it should make a bit more sense.

If you've looked through both of those and cannot see how to get started perhaps you could ask some more directed questions to get the ball rolling?
_________________
My Mods | Moderator CP
Back to top
View user's profile Send private message Visit poster's website

~HG~
Dedicated User

Joined: 08 Nov 2003
Posts: 3913
Location: Australia

PostPosted: April 23rd 2009, 10:48 am    Post subject: Reply with quote

Thanks MilkHub.

I have been through those 2 listed before as well as everything else on phpbb.com, all of which seem to be aimed at the end user (ie, the person installing the mod) and yet there does not appear to be anything at all directed to the mod author particularly in how to write a modx file.

In the FAQ on MODX at phpbb.com there is this question and answer;

Quote:
Can I write MODX by hand?
Yes, there is a tutorial on how to write MODX by hand. The process should be familiar to anyone who has ever written HTML by hand.


The word tutorial is a link however it takes you back to the ModX resource centre page where there is no tutorial that I can find on writing a ModX file.

There is of course the Quickstart files which includes the licence and .xsl file which must be included but there is definetly no tutorial on writing the MODX file itself other than the sample.
_________________
~HG~

|| rodneyangell.com || || phpbb-tutorials.com ||My Hacks
Back to top
View user's profile Send private message Send e-mail Visit poster's website

lefty74
Well Known User

Joined: 13 Feb 2006
Posts: 146

PostPosted: April 23rd 2009, 12:44 pm    Post subject: Reply with quote

are you familiar with writing mods in the old .txt format?
_________________
www.zoocrew.eu - Help us save our wildlife -
Back to top
View user's profile Send private message Visit poster's website MSN Messenger

~HG~
Dedicated User

Joined: 08 Nov 2003
Posts: 3913
Location: Australia

PostPosted: April 23rd 2009, 9:56 pm    Post subject: Reply with quote

Very familiar with the .txt format lefty but that doesn't help me with the MODX setup.

I can follow and understand everything on phpbb.com about MODX. That's easy enough. But where do you start in setting up the .xml page etc ???

Here I have changed your .xml file for Avatar in Who Is Online mod to .txt and this gives me the best indication yet.

I no doubt could edit your file with my own info and save it as an .xml file and I dare say that would work. Messy naturally, but I am sure I would be right in doing it that way. So I think there must be an easier way than that.

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.1.xsd">
  <header>
    <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
    <title lang="en-gb">Avatar in Who is Online</title>
    <description lang="en-gb">Shows the Avatar of users in the Who is online page
</description>
    <author-notes lang="en-gb">Another avatar mod :P
</author-notes>
    <author-group>
      <author>
        <realname>Heiko Carstens</realname>
        <email>lefty@lefty74.com</email>
        <username>lefty74</username>
        <homepage>http://www.lefty74.com</homepage>
        <contributions />
      </author>
    </author-group>
    <mod-version>
      <major>1</major>
      <minor>0</minor>
      <revision>0</revision>
    </mod-version>
    <installation>
      <level>easy</level>
      <time>519</time>
      <target-version>
        <target-primary>3.0</target-primary>
        <target-major allow="exact">2</target-major>
        <target-minor allow="exact">0</target-minor>
      </target-version>
    </installation>
    <history>
      <entry>
        <date>2007-07-22</date>
        <rev-version>
          <major>0</major>
          <minor>0</minor>
          <revision>1</revision>
        </rev-version>
        <changelog lang="en-gb">
          <change>Initial release</change>
        </changelog>
      </entry>
      <entry>
        <date>2007-07-29</date>
        <rev-version>
          <major>0</major>
          <minor>0</minor>
          <revision>1</revision>
          <release>a</release>
        </rev-version>
        <changelog lang="en-gb">
          <change>made RC4 compliant</change>
        </changelog>
      </entry>
      <entry>
        <date>2007-10-28</date>
        <rev-version>
          <major>0</major>
          <minor>0</minor>
          <revision>1</revision>
          <release>b</release>
        </rev-version>
        <changelog lang="en-gb">
          <change>made RC7 compliant</change>
        </changelog>
      </entry>
      <entry>
        <date>2008-01-14</date>
        <rev-version>
          <major>0</major>
          <minor>0</minor>
          <revision>2</revision>
        </rev-version>
        <changelog lang="en-gb">
          <change>resizes avatar to a max width/height</change>
        </changelog>
      </entry>
      <entry>
        <date>2008-03-02</date>
        <rev-version>
          <major>1</major>
          <minor>0</minor>
          <revision>0</revision>
        </rev-version>
        <changelog lang="en-gb">
          <change>repackaged for submission to MODDB</change>
        </changelog>
      </entry>
    </history>
    <meta name="generator" content="Phpbb.ModTeam.Tools (c#)" />
  </header>
  <action-group>
    <open src="viewonline.php">
      <edit>
        <find>include($phpbb_root_path . 'common.' . $phpEx);
</find>
        <action type="after-add">include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
</action>
      </edit>
      <edit>
        <find>// Get user list
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_type, u.user_colour,</find>
        <inline-edit>
          <inline-find> u.user_colour,</inline-find>
          <inline-action type="after-add"> u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, </inline-action>
        </inline-edit>
      </edit>
      <edit>
        <find><![CDATA[   $template->assign_block_vars('user_row', array(]]></find>
        <action type="before-add"><![CDATA[   $avatar_max_dimensions = $avatar_width = $avatar_height   = '';
   if ( !empty($row['user_avatar']) )
   {
      $avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed, change to 0 to use default
   
      if ( $avatar_max_dimensions )
      {   
         if ( $row['user_avatar_width'] >= $row['user_avatar_height'] )
         {
            $avatar_width = ( $row['user_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['user_avatar_width'] ;
            $avatar_height = ( $avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['user_avatar_width'] * $row['user_avatar_height']) : $row['user_avatar_height'] ;
         }
         else
         {
            $avatar_height = ( $row['user_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['user_avatar_height'] ;
            $avatar_width = ( $avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['user_avatar_height'] * $row['user_avatar_width']) : $row['user_avatar_width'] ;
         }
      }
      else
      {
         $avatar_height    = $row['user_avatar_height'];
         $avatar_width    = $row['user_avatar_width'];
      }
   }]]></action>
      </edit>
      <edit>
        <find><![CDATA[      'USERNAME'          => $row['username'],
]]></find>
        <action type="after-add"><![CDATA[      'ONLINE_AVATAR'    => ( $row['user_avatar'] ) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $avatar_width, $avatar_height) : '',
]]></action>
      </edit>
    </open>
    <open src="styles/prosilver/template/viewonline_body.html">
      <edit>
        <find><![CDATA[         <th class="name"><a href="{U_SORT_USERNAME}">{L_USERNAME}</a></th>]]></find>
        <action type="before-add"><![CDATA[         <th>&nbsp;</th>]]></action>
      </edit>
      <edit>
        <find><![CDATA[         <td>{user_row.USERNAME_FULL}<!-- IF user_row.USER_IP --> <span style="margin-left: 30px;">{L_IP}:
]]></find>
        <action type="before-add"><![CDATA[         <td style="width:20px;"><!-- IF user_row.ONLINE_AVATAR -->{user_row.ONLINE_AVATAR}<!-- ENDIF --></td>]]></action>
      </edit>
      <edit>
        <find><![CDATA[         <td colspan="{%:1}">{L_NO_ONLINE_USERS}<!-- IF S_SWITCH_GUEST_DISPLAY --> &bull; <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a><!-- ENDIF --></td>
]]></find>
        <action type="operation">%:1</action>
      </edit>
    </open>
  </action-group>
</mod>

_________________
~HG~

|| rodneyangell.com || || phpbb-tutorials.com ||My Hacks
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 3 Hack Requests and Development All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2
Jump to:  
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



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.