News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

MOD Site?

Started by Grudge, August 03, 2003, 11:46:32 AM

Previous topic - Next topic

Spaceman-Spiff

Problem is, not everyone knows XML, except if you make a mod builder for it (like YAME)

Jack.R.Abbit™

I have not taken a good look at the XML format that [Unknown] put together, but I can't imagein it being too much more difficult than the current <search></search><replace></replace> I mean it is still just tags... maybe they are nested now... but there are still just tags.  It should look that foreign.

If BoardMod would just work it so that it does not require whole line search, everything would be fine.  I was poking around in the source code this weekend and I thought it was a little messy how the search/replace/add does like 2 or 3 checks to see that the searched string is a complete line... I saw no need for that.  But I did not have the time to fully investigate the logic behind it all.  From a modding point of view it makes way more sense to not have to search and replace/add whole lines of code.

Joshua Dickerson

Boardmod is much harder for this community to edit and keep up to date because the majority of the people are PHP programmers. Most don't know anyother language.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Jeff Lewis

Quote from: [Unknown] on August 13, 2003, 03:37:53 PM
I *still* like my xml format better.... but that's because I like xml.

-[Unknown]

I fully agree :)
Co-Founder of SMF

David

Dan made a very good point, it isn't boardmod vs "some"pack manager it should be what will best suit users.  Make it easy to apply mods and updates and what will provide good security.
This space for rent.

Shoeb Omar

Just out of interest, and please don't kill me because I admit I haven't read the entire thread, but what are the benefits of XML format?

David

Quote from: Shoeb Omar on August 16, 2003, 12:47:22 PM
Just out of interest, and please don't kill me because I admit I haven't read the entire thread, but what are the benefits of XML format?
Greater flexability, more organized mod files, ability to be easily parsed by already existing XML engines.  Unknown knows more.
This space for rent.

Shoeb Omar

Quote from: David on August 16, 2003, 01:02:38 PM
Quote from: Shoeb Omar on August 16, 2003, 12:47:22 PM
Just out of interest, and please don't kill me because I admit I haven't read the entire thread, but what are the benefits of XML format?
Greater flexability, more organized mod files, ability to be easily parsed by already existing XML engines.  Unknown knows more.

Not to be a******, but can you b a .little more specific?  I mean, how would it offer greater flexibility, and why would it need to be parsed by xml engines?

Sorry, I am new to XML also :(

mattsiegman

basically, XML is all lowercase,  and you have to add a tag to it the .mod format :)

example


<?xml version="1.0">
<mod>
  <author name="Matt Siemgna" />
  <file name="sources/admin.php">
    <modification>
      <search>
      //code
      </search>
      <replace>
      //code
      </replace>
    </modification>
</file>
</mod>
-- Matt Siegman

[Unknown]

There are two ways I want it to use xml... number 1 is...

<modification xmlns="http://www.yabbse.org/xml/modification">
  <id>unknownbrackets:global_cookies</id>
  <name>Global Cookies</name>
  <version required="YaBB SE 1.5.1">1.0</version>
  <author email="[email protected]">[Unknown]</email>
  <information><![CDATA[
Allows use of cookies globally, across domains.

Example:
Your forum is at:  http://forum.coolplace.me/
Your site is at:   http://www.coolplace.me/

You will be able to access the cookie with Global Cookies enabled.]]></information>
  <execute-sql><![CDATA[
   INSERT IGNORE INTO {$db_prefix}settings
      (variable, value)
   VALUES ('globalCookies', '1')]]></execute-sql>
  <file name="Sources/Subs.php" required-version="YaBB SE 1.5.1">
    <search error="fatal">
      <for-code><![CDATA[
function url_parts()
{
   global $boardurl, $modSettings;
   $cookie_dom = ''; $cookie_dir = '/';

   if ($modSettings['localCookies'] == '1') {
      $url .= $boardurl . "/";
      $pos = strpos($url, '//');
      if ($pos > 0 && strncmp(strtolower($url), 'http:', $pos) == 0)   //Valid protocol
      {
         $urlpos = strpos($url, '/', $pos + 2);

         if ($urlpos > 0)
         {
            $cookie_dom = substr($url, $pos + 2, $urlpos - $pos - 2);
            $cookie_dir = substr($url, $urlpos);
         }
      }
   }

   return "$cookie_dom<yse_sep>$cookie_dir";
}]]></for-code>
      <replace><![CDATA[// Sort out the parts of the URL for cookie purposes.
function url_parts()
{
   global $boardurl, $modSettings;

   // Is local cookies on?
   if ($modSettings['localCookies'] == '1')
   {
      $url = $boardurl . '/';
      $pos = strpos($url, '//');

      // Check for a valid protocol... (http)
      if ($pos !== false && strncmp(strtolower($url), 'http:', $pos) == 0)
      {
         $urlpos = strpos($url, '/', $pos + 2);

         if ($urlpos !== false)
         {
            $cookie_dom = substr($url, $pos + 2, $urlpos - $pos - 2);
            $cookie_dir = substr($url, $urlpos);
         }
      }
   }
   // Globalize cookies across domains?
   elseif ($modSettings['globalCookies'] == '1')
   {
      preg_match('~http://(?:\w+\.)?(\w+\.\w+)(?:\z|/)~i', $boardurl, $parts);
      $cookie_dom = '.' . $parts[1];
      $cookie_dir = '/';
   }

   // Otherwise set some basic stuff.
   if (!isset($cookie_dir))
   {
      $cookie_dom = '';
      $cookie_dir = '/';
   }

   return $cookie_dom . '<yse_sep>' . $cookie_dir;
}]]></replace>
    </search>
  </file>
  <file name="Sources/ModSettings.php" required-version="YaBB SE 1.5.1">
    <search error="fatal">
      <for-code><![CDATA[
                        </td>
                        <td class="windowbg2" bgcolor="' . $color['windowbg2'] . '">
                           <input type="checkbox" name="localCookiesChecked" value="1"' . $localCookiesChecked . ' />
                        </td>]]></for-code>
      <where type="not" direction="below" error="fatal"><![CDATA[
                     </tr><tr>
                        <td valign="top" class="windowbg2" bgcolor="' . $color['windowbg2'] . '"><a href="javascript:reqWin(\'' . $scripturl . '?action=helpadmin;help=m_globalc\')" class="help"><img src="' . $imagesdir . '/helptopics.gif" border="0" alt="' . $txt[119] . '" /></a></td>
                        <td class="windowbg2" bgcolor="' . $color['windowbg2'] . '"><font size="2">' . $txt['globalCookies'] . '</font></td>
                        <td class="windowbg2" bgcolor="' . $color['windowbg2'] . '"><input type="checkbox" name="globalCookies" value="1"' . ($modSettings['globalCookies'] ? ' checked="checked"' : '') . ' /></td>]]></where>
      <add direction="below"><![CDATA[
                     </tr><tr>
                        <td valign="top" class="windowbg2" bgcolor="' . $color['windowbg2'] . '"><a href="javascript:reqWin(\'' . $scripturl . '?action=helpadmin;help=m_globalc\')" class="help"><img src="' . $imagesdir . '/helptopics.gif" border="0" alt="' . $txt[119] . '" /></a></td>
                        <td class="windowbg2" bgcolor="' . $color['windowbg2'] . '"><font size="2">' . $txt['globalCookies'] . '</font></td>
                        <td class="windowbg2" bgcolor="' . $color['windowbg2'] . '"><input type="checkbox" name="globalCookies" value="1"' . ($modSettings['globalCookies'] ? ' checked="checked"' : '') . ' /></td>]]></add>
    </search>
    <search error="fatal" type="not">
      <for-code><![CDATA[
      'globalCookies' => 'globalCookies',]]></for-code>
    </search>
    <search error="fatal">
      <for-code><![CDATA[
   // let's do all the checkbox values....
   $onoffArray = array(]]></for-code>
      <add direction="below"><![CDATA[
      'globalCookies' => 'globalCookies',]]></add>
  </file>
  <language-file name="Admin/Settings.english">
    <add key="globalCookies"><![CDATA[Use subdomain independent cookies?<br />Warning: turn off Local Cookies!</add>
  </language-file name="Admin/Help.english">
    <add key="m_globalc"><![CDATA[
   Allows for the use of subdomain independent cookies.  For example, if...<br />
   Your site is at http://www.yabbse.org/,<br />
   And your forum is at http://forum.yabbse.org/,<br />
   Using this modification will allow you to access the forum\'s cookie on your site.]]></add>
  <language-file>
</modification>


Which is all well and good, but we'd probably have to write a custom board mod... so...

The other one is server lists.  I think I managed to convince everyone that was better.  It's format would/will be something like:
http://unknown.network32.net/packages.xml (just in case you're wondering, http://unknown.network32.net/ uses that file.)

-[Unknown]

mattsiegman

Unknown,  I want YaBB 2 to have the same format as SE with the package managers.  Is that the final version of you XML, or are you guys still working on it?
-- Matt Siegman

Shoeb Omar

I think the main reason I'm not getting it's advantage is because I don't understand xml.... how does it work then? ;)

[Unknown]

Quote from: mattsiegman on August 16, 2003, 02:54:47 PM
Unknown,  I want YaBB 2 to have the same format as SE with the package managers.  Is that the final version of you XML, or are you guys still working on it?

Working copy... we should talk.

Shoeb Omar, one of the benefits is grouping, multiple search statements, reverse search statements (meaning it *should not* be found.), and so forth.

-[Unknown]

Krysia

To get back to the initial topic...

I, for one, would absolutely love it if there was a "supermod" version, or better yet --- just have it ready to go with all the mods already in there.

Being a Mac user, Boardmod does nothing for me :( *sniffle*... and installing all the mods for the desired look/effects on my board by hand took up a scary amount of time.

LOL - Just in time for my host to decide to support SQL, in which case, I switched to YaBBSE because it was much easier to install. Tried doing a couple of basic mods by hand, then saw the "supermod" and said... That's for me.

So I reinstalled with SuperModYaBBSE, and ahhhh.... How utterly relaxing that experience was in comparison! LOL!

If you guys hooked me up with a MegaSimpleMachine like that... not only would I love you forever and ever, I'd plunk down the $50 and be charterized.  ;D

Oh - and if you do... can I make an early request for a zodiac mod to be included?  ;)
:)



treo

Using XML I think every mod can be done online, so something like Board Mod isn't even needed.
And if there will be a programm for that I think it would be great if it would be a Java programm because no porting to the diffrent OSes is needed or C++ would be also fine because porting is easy.



PS: The spell check doesn't know the word "online" :D

Omar Bazavilvazo

a YaME like editor, i think would be needed to make SMF packages much more easy to write :)

and, that xml format looks cool :)




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

writeto

Is there a mod team?
If there isn't there should be one. Being a programmer there is nothing I hate more then redoing something. Even if the team doesn't collaborate or work together cohesively there should be some sort of grouping so that everybody doesn't have to write the same code.

While on the subject, if there is a team/group I would be interested in joining said group/team. I do not have an over abundance of time, however I do have enough that I could dedicate a couple of hours a week/month to this.

Andrew

[Unknown]

#117
I haven't yet seen your code, but from you intelligent responses to.... every single thread you've posted in, I'm looking forward to it.

Yes, there is a team... some people are in the "Mod Developer" group, and you can see more information here: (about who's on it.)
http://www.simplemachines.org/team.php

I'd talk to Jack.R.Abbit and David about joining the Mod Developer team.  It's no small matter either, because Mod Developer's get the betas, etc. just like Charter Members... so... and you'll have to be voted in.... can be quite an ordeal...

Anyhow, talk [to] the people I mentioned, and let's see what happens...

-[Unknown]

writeto

Thank you for the information [Unknown], I will have to look into doing that. Although if it is an ordeal maybe I will just catch some runoff.

Andrew

Tyris

heheh, I'd like to joing too ^_^
actually.. my code is still far from professional so I guess I'll just free-lance modding when SMF is released puclic to try and increase my skills and eventually be actually good enough.
Of course from what I hear basically every mod will be listed somewhere in the modding forum etc, so making sure there is no similar mod before you start wouldn't be too much of a problem ^_^

Advertisement: