Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
rename filesystem function
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/28/09 18:38 
Is there a filesystem function to rename stuff? Like to rename a file or folder?


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 01/28/09 18:39 
http://us3.php.net/rename

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/28/09 18:43 
Thanks, I found that but wasn't sure if there was something already there for it that I was supposed to use.

I guess I'm still a little confused where some of the functions are to be used, and where to just dig stuff from the php docs. Have you only listed functions where its not just a one liner in php, or completely specific to jamrooms internals?


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 01/28/09 18:44 

djmerlyn:
Thanks, I found that but wasn't sure if there was something already there for it that I was supposed to use.

I guess I'm still a little confused where some of the functions are to be used, and where to just dig stuff from the php docs. Have you only listed functions where its not just a one liner in php?


If it is listed in the Jamroom Function Reference:

http://www.jamroom.net/Jamroom_Function_Reference

then it's good to use it. There's nothing wrong with using the PHP functions if they do the deed (which is what I would do).

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/28/09 18:46 
Ok, so they're really optional? Smile

I figured that those functions listed in the jr docs were required, so every time I add something I've been checking there.

Thanks man!


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 01/29/09 01:35 
Jamroom has lots of "streamlined" functions that make things easier than having to do a bunch of regular php functions, i.e. instead of having to do fopen, fwrite, and fclose to writes something to a file, you can just use Jamroom's writeToFile() function.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/29/09 12:18 

smith.kyle:
Jamroom has lots of "streamlined" functions that make things easier than having to do a bunch of regular php functions, i.e. instead of having to do fopen, fwrite, and fclose to writes something to a file, you can just use Jamroom's writeToFile() function.


See, its sorta confusing for me because;

"Jamroom Module API"

I can't really think of this as an API anymore, the name just doesn't fit what this is to me. To me, the ranking system is an API (you pass specific data to a script and get data back, wrong data passed to the script and you get nothing).

This is more like an external hook to third party scripts, or a folder where you can add changes and functions that won't be overwritten on upgrade. I think of an API a lot more like the ranking script where you have to create data a certain way before passing it to a script in order to get anything back from the script.

Most API's that I've worked with don't work like the jamroom modules at all. They have a very specific interface for communication, sometimes they take XML input and sometimes they take post data, but one way or another the data has to be formatted exactly how it wants it or it won't work.

This is more like, you call a specific file from jamroom in to the top of your script and poof you're in and can do what you want Smile That doesn't strike me as an API, but as an external hook in to an unused directory.

I approached this with the idea that it was an API, where I need to format my code very specifically for jamroom to take it. So I keep grooming the docs for a point in the right direction, but its very open "do this and this, then write whatever php code you want".

Not that there is anything wrong with calling it an API, but it just doesn't strike me as an API at all which has left me a bit bewildered. The existing scripts (ranking, comments, guestbook, etc...) act much more like an API to me then the module system.

But either way, this is cool so that something custom can be built- and you don't need to re-do it on every upgrade Very Happy


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 01/29/09 12:24 

djmerlyn:

smith.kyle:
Jamroom has lots of "streamlined" functions that make things easier than having to do a bunch of regular php functions, i.e. instead of having to do fopen, fwrite, and fclose to writes something to a file, you can just use Jamroom's writeToFile() function.


See, its sorta confusing for me because;

"Jamroom Module API"

I can't really think of this as an API anymore, the name just doesn't fit what this is to me. To me, the ranking system is an API (you pass specific data to a script and get data back, wrong data passed to the script and you get nothing).

This is more like an external hook to third party scripts, or a folder where you can add changes and functions that won't be overwritten on upgrade. I think of an API a lot more like the ranking script where you have to create data a certain way before passing it to a script in order to get anything back from the script.

Most API's that I've worked with don't work like the jamroom modules at all. They have a very specific interface for communication, sometimes they take XML input and sometimes they take post data, but one way or another the data has to be formatted exactly how it wants it or it won't work.

This is more like, you call a specific file from jamroom in to the top of your script and poof you're in and can do what you want Smile That doesn't strike me as an API, but as an external hook in to an unused directory.

I approached this with the idea that it was an API, where I need to format my code very specifically for jamroom to take it. So I keep grooming the docs for a point in the right direction, but its very open "do this and this, then write whatever php code you want".

Not that there is anything wrong with calling it an API, but it just doesn't strike me as an API at all which has left me a bit bewildered. The existing scripts (ranking, comments, guestbook, etc...) act much more like an API to me then the module system.

But either way, this is cool so that something custom can be built- and you don't need to re-do it on every upgrade Very Happy


I'm not sure of your familiarity with API's in general, but Jamroom's API is pretty straightforward. Basically the Jamroom functions provide an "interface" to Jamroom's functions (i.e. saving info, showing info, display things, etc. - in the "Jamroom way"). Like a C API, or jQuery (javascript) "API", you're never stuck using only what is in the API, but can always go outside the box by using your own commands and code ALONG with the API.

What you are referring to sounds more like a REST style "interface" - i.e. something that performs a very specific function based on criteria you pass it.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/29/09 12:32 
I guess I should figure out what each software means when they say "API", apparently it depends on the software what exactly it means.

I'm used to API's that function like this from paypal;


Code
<SOAP-ENV:Header>
<RequesterCredentials xmlns=”urn:ebay:api:PayPalAPI” xsi:type=”ebl:CustomSecurityHeaderType”>
<Credentials xmlns=”urn:ebay:apis:eBLBaseComponents” xsi:type=”ebl:UserIdPasswordType”>
<Username xsi:type=”xs:string”>api_username</Username>
<Password xsi:type=”xs:string”>api_password</Password>
<Signature xsi:type=”xs:string”>api_signature</Signature>
<Subject xsi:type=”xs:string”>authorizing_account_emailaddress</Subject>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>


100% of API's that I've used (so far) work this way, you specifically format something then send it to another script and if your code is right it accepts it, processes it and sends something back. I use this type of API system every day and it makes perfect sense to me.

This is sorta what I had expected of JR's API system because, well because its called an API. I like the way it is "actually" set up because its far more free then a typical API, but it still doesn't strike me as an API like what I'm accustomed to.


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 01/29/09 12:34 
This is a SOAP Web Services request - not an API Wink However, I think the acronym API is used all over the place now, and probably means some different in a lot of places.

Jamroom's API can be thought of as a functional library that provides an "interface" into Jamroom's functionality.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/29/09 12:38 

bigguy:
This is a SOAP Web Services request - not an API Wink However, I think the acronym API is used all over the place now, and probably means some different in a lot of places.

Jamroom's API can be thought of as a functional library that provides an "interface" into Jamroom's functionality.

Hope this helps!

- Brian


Yeah, see they call it an API. Cpanel uses a similar XML system which they also call an API. Our shoutcast system also uses an XML/SOAP system also called an API. Our billing software too, same type of deal. This is why I've been so confused. I think if I just ditch the jamroom modules docs, to check my work, and strike out on my own I'll be just fine Laughing


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 01/29/09 12:41 
Based on my personal experience, they're all wrong Wink Those are "Web Services":

http://en.wikipedia.org/wiki/Web_service

Jamroom's library routines are more along the lines of a traditional API:

http://en.wikipedia.org/wiki/API

But I guess it really doesn't matter - whatever acronym you want to use works for me Wink

Thanks!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/29/09 12:42 

Quote:
Web services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.


Boy, I thought I was nerdy, but clearly not enough Laughing

Cheers!


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 01/29/09 12:44 
there you go.. I need to brush up on my lingo - "Web Services" are now "Web APIs".

The Jamroom API is a non-web API Wink

Thanks!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 01/29/09 12:47 
In that same "vein" though, you could easily look at the ranking system as a "web API", as it can write XML, SOAP, etc.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

12Next >
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.