Jump to content


Photo

Modules Directory


  • Please log in to reply
67 replies to this topic

#21 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 366 posts
  • 231

Posted 25 July 2012 - 12:06 PM

Ryan, this, and the whole of PW just reeks of awesomeness! Unfortunately i'm not in a position where i can promote PW in way that would actually matter, so you better set something up so we can contribute in a monetary fashion. You deserve some Euro's coming your way for the pleasure i've had working with PW.

#22 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 657

  • LocationChester, England

Posted 25 July 2012 - 12:42 PM

ryan - The module for IP Board would need to read files from the forum directory (it initialises and uses various classes) so I'm not sure how we could work around that.

I can send you what I've got shortly and you can have a look though.

#23 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3108

  • LocationAtlanta, GA

Posted 25 July 2012 - 02:35 PM

@Sinnut thanks! you are way too kind.

@Pete we should still be able to read from the same dir even if they aren't on the same account -- just a unix permissions adjustment which I'm sure I can figure out.

@Soma Here's a web service:

http://modules.proce...om/export-json/

Use API key: pw223

Let me know if there's anything else I can add to it.

#24 Soma

Soma

    Hero Member

  • Moderators
  • 3,186 posts
  • 1740

  • LocationSH, Switzerland

Posted 25 July 2012 - 02:57 PM

Awesome Ryan! Thanks, I'll test out a little and report back if any issues arises.

@somartist | modules created | support me, flattr my work flattr.com


#25 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 657

  • LocationChester, England

Posted 25 July 2012 - 03:08 PM

Love all of this - I've uploaded my modules :)

I think there are only a very few things I'd suggest adding (that may also cause you a headache! :P):
  • The ability to upload images for illustration/instruction purposes
  • The ability to link to a YouTube or Vimeo video
  • A download counter
Other than that it's all very good.

My only other thought is that it asks you to enter your forum name as it appears in the forums, but your name appears lowercase after you submit the module. Am I right in assuming it's creating a ProcessWire user account? In that case wouldn't it make sense to have another field in the user template called "forum display name" or something like that?

#26 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3108

  • LocationAtlanta, GA

Posted 25 July 2012 - 03:35 PM

Thanks for adding your modules Pete!

The ability to upload images for illustration/instruction purposes


I agree I'd like to add this eventually, but really only had a day of time to put towards the directory, so decided to leave that out. I think it's adequate that users can link to their image in the forum or GitHub with the [img] BBCode tag. When I get more time, I'll add file uploads in the directory.

The ability to link to a YouTube or Vimeo video


This one should be relatively easy with the new TextformatterVideoEmbed module. :) Though I think I need to modify it a bit to recognize videos in BBCode, since BBCode seems to be using double <br> tags rather than paragraphs.

A download counter


I'd like to do this with a little javascript attached to the <a>, so as to avoid routing the file download through any passthru scripts, especially since we aren't hosting the downloads. But we can only count the downloads that originate from people clicking our download button. We can't track git clones or downloads from there, which I'm guessing would be a significant amount. Still, that may be okay as download quantity probably is still a good factor to judge relative popularity among modules.

One cool thing to consider: since we are now requiring a download URL to a ZIP file, and we're providing a web service of the data, we now have the prerequisites for automatic 1-click-installation directly in ProcessWire. It's cool to dream about anyway.

#27 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 657

  • LocationChester, England

Posted 25 July 2012 - 03:54 PM

Didn't know whether we could grab images in an img tag via the BBCode library you'd used, but it males sense that you would be able to now I think about it since that ability has been around since the invention of BBCode, so that's handy.

You certainly managed a lot in one day! If I had days where I could pull off that amount of work then I'd I'd have less personal projects in the planning stages ;)

I agree with you on all the other points, and I like the idea of a module installer inside ProcessWire ;)

I foresee two download URLs being commonly used (I've used them both) - one is the direct link to the GitHub download and the other one is the direct link to an attachment on the forums. I guess it would be a case of somehow checking if a given URL is trying to pass the module installer a zip file and if so then grab it, else link to the download page.

I'm also guessing this is why you ask people for the class name, since inside a non-Github zip file the structure could be a bit odd, so being able to search for a file called ClassName.module within a zip file's folders would allow you to correctly install the module in the right place (for example in the event anyone zips up an unnecessarily long folder structure along the lines of /my/first/modules/doodah/MarkupSitemapXML/ which contains MarkupSitemapXML.module, not that I'd make it that hard for you ;)).

#28 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3108

  • LocationAtlanta, GA

Posted 25 July 2012 - 04:05 PM

You certainly managed a lot in one day! If I had days where I could pull off that amount of work then I'd I'd have less personal projects in the planning stages


When I'm motivated, I can develop stuff in PW pretty quickly. Other stuff, not so quickly. :) I'm sure I have just as many personal projects in the planning stages, though almost all are at least PW-related.

I foresee two download URLs being commonly used (I've used them both) - one is the direct link to the GitHub download and the other one is the direct link to an attachment on the forums.


The advantage of the GitHub download URL is that it never changes. So the same URL always points to the latest stable version. Linking to files in the forum is more tricky, because the author may have uploaded another and forgot to update the module listing, or may have simply posted another file, etc.

I'm also guessing this is why you ask people for the class name, since inside a non-Github zip file the structure could be a bit odd, so being able to search for a file called ClassName.module within a zip file's folders would allow you to correctly install the module in the right place


That's pretty much right. If we went towards an auto-installer, it would know to create a directory called /site/modules/[class-name]/ and unzip the files into that directory.

The other part of it is that the class name is used as the module's URL name in the directory (after being converted from camelCase to not-camel-case). This ensures no two modules exist in the directory that have the same class name.

#29 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3108

  • LocationAtlanta, GA

Posted 26 July 2012 - 08:10 AM

Nico, have you had a chance to try adding modules to the directory again? We've had a lot of stuff added, but I don't think any of yours are in there yet. Let me know if you are still running into any issues with the add module page.

#30 adamkiss

adamkiss

    Master of the universe

  • Moderators
  • 1,078 posts
  • 289

Posted 26 July 2012 - 11:45 AM

Fantastic! :)

#31 Soma

Soma

    Hero Member

  • Moderators
  • 3,186 posts
  • 1740

  • LocationSH, Switzerland

Posted 26 July 2012 - 01:48 PM

I noticed something also only while working on the Modules Manager module :)

Ryan, what's about the module version in code (000)? Is it also valid to write 1.0 or 1.0.1 in getModuleInfo array? I noticed some people (diogo, nico) use this to write the version and I think it's wrong.

Considering this it is a little annoying that one have to insert it manually and in two different formatting. On the module directory you enter 1.0.0 in the module code 100. Wouldn't it be better to make it consistent?

Also to understand it in general, why does 008 not work and return 0 or 0.0.0 ? I figure it is because it's octal? But why?

@somartist | modules created | support me, flattr my work flattr.com


#32 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3108

  • LocationAtlanta, GA

Posted 26 July 2012 - 02:33 PM

I should probably make the module 'add' page use an integer rather than a string. But the two can be translated to/from each other (integer -> string).

1 = 0.0.1
10 = 0.1.0
100 = 1.0.0
111 = 1.1.1

I will plan to add this clarification to the module add form.

#33 Soma

Soma

    Hero Member

  • Moderators
  • 3,186 posts
  • 1740

  • LocationSH, Switzerland

Posted 26 July 2012 - 03:57 PM

Thanks, can you clarify my last question from the previous post?

@somartist | modules created | support me, flattr my work flattr.com


#34 diogo

diogo

    Hero Member

  • Moderators
  • 1,982 posts
  • 1061

  • LocationPorto, Portugal

Posted 26 July 2012 - 06:08 PM

I updated my modules and modules page according to those rules. Hope it helps.

#35 Soma

Soma

    Hero Member

  • Moderators
  • 3,186 posts
  • 1740

  • LocationSH, Switzerland

Posted 26 July 2012 - 06:17 PM

I updated my modules and modules page according to those rules. Hope it helps.


I just hit "refresh" in the admin and there it shows the updated version! So cool ;)

@somartist | modules created | support me, flattr my work flattr.com


#36 formmailer

formmailer

    Sr. Member

  • Members
  • PipPipPipPip
  • 245 posts
  • 28

  • LocationHudiksvall, Sweden (but originally from The Netherlands)

Posted 27 July 2012 - 01:48 AM

Hi Ryan and all others!

This is a great addition and it will make it so much easier for PW users to find all these cool modules and themes.

I haven't been very active recently (have been without internet for quite some time because we moved to a new house and the internet/phone company had some issues when connecting us). But soon I'll become more active again and will update a few of my modules/language packs.

/Jasper

#37 diogo

diogo

    Hero Member

  • Moderators
  • 1,982 posts
  • 1061

  • LocationPorto, Portugal

Posted 27 July 2012 - 06:27 AM

Soma's module manager wasn't able to get the file from the forum thread of my module http://processwire.c...ule-image-tags/.
Meanwhile, I created a github page and all works now.

I noticed that when I opened the link in the browser from the module manager, I was asked to login to get to the file. So, that's where the problem lives. The files from the forum are not opened to everyone, so they shouldn't be used on the modules pages as the download link. My mistake, but maybe there should be a reference to this on the "download url" field description.

#38 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3108

  • LocationAtlanta, GA

Posted 27 July 2012 - 10:43 AM

It looks like hotlinking images from the forum also doesn't work. Not sure if it's the same issue with whether the user is logged in, or if it's just that the URLs are so long and complex that BBCode no longer recognizes them as valid image URLs.

During one of the next updates to the directory, I'm hoping to add file upload capability for image and archives, for the situations where GitHub may not be in use.

Also to understand it in general, why does 008 not work and return 0 or 0.0.0 ? I figure it is because it's octal? But why?


I don't know? :huh: Curious if anyone else does. I don't think I've worked with octal numbers in PHP before.

#39 nik

nik

    Sr. Member

  • Members
  • PipPipPipPip
  • 203 posts
  • 329

  • LocationTampere, Finland

Posted 27 July 2012 - 01:23 PM

PHP-newbie just had to find this one out - but it wasn't actually that much of a PHP-related thing after all... ;)

Also to understand it in general, why does 008 not work and return 0 or 0.0.0 ? I figure it is because it's octal? But why?


Yes, the leading zero makes it octal - and octal numbers may contain only digits 0-7, so your example was just a bit off the limits :). PHP.net says: "If an invalid digit is given in an octal integer (i.e. 8 or 9), the rest of the number is ignored.". (Whole article on integers.) And there's the explanation for 008 becoming a zero in the quote as well.

My modules: Selector Test | After Save Actions | References Tab ~ Other: Tests for ProcessWire core (work in progress)


#40 Soma

Soma

    Hero Member

  • Moderators
  • 3,186 posts
  • 1740

  • LocationSH, Switzerland

Posted 27 July 2012 - 01:23 PM

I don't know? :huh: Curious if anyone else does. I don't think I've worked with octal numbers in PHP before.


Well I was mixing something, the octal was from the permissions. However, you really don't know why the versioning number in modules is bugged?

Language Localized URl module has 008, but it show 0.0.0. Also 009 does. If entering 100 it works, or 007 too.

PastedGraphic-1.png

@somartist | modules created | support me, flattr my work flattr.com





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users