• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.0 Editing Templates and Defining a Callback for Pages

Kier

XenForo Developer
Staff member
#22
That's a depressing post... but do you think it'd be possible? I'm not all to familiar with WebDAV...
WebDAV is just a protocol that sits on top of HTTP and presents a resource in the form of a file, so you would be able to download all the templates via WebDAV and commit them to SVN from the downloaded location, if you wanted to do that?

I'm not sure of the implementation you have in mind, can you outline how you'd see it working from a user perspective?
 

RickM

Well-known member
#23
Anyone know how to connect webdav up on a htaccess protected domain? Seems to be struggling to connect and I didnt really want to remove htaccess auth before we're ready :(
 
R

ragtek

Guest
#24
WebDAV is just a protocol that sits on top of HTTP and presents a resource in the form of a file, so you would be able to download all the templates via WebDAV and commit them to SVN from the downloaded location, if you wanted to do that?

I'm not sure of the implementation you have in mind, can you outline how you'd see it working from a user perspective?
IMHO it would be "nice" if we could create templates in files while developing add-ons, which aren't stored in the database.
In vB, my developer tools add-on "inserted" all own templates into the templatecache.

(scan add-on template directory, search for .html files, read them and insert them into the templatecache)

On add-on export, the same thing happens again and stores them into the add-on xml file.

The benefits are, you can use a HTML IDE for the html editing and you can use a repository (svn,git) if you're working in an team.

Hope you know what i mean:/
 

Kier

XenForo Developer
Staff member
#25
IMHO it would be "nice" if we could create templates in files while developing add-ons, which aren't stored in the database.
In vB, my developer tools add-on "inserted" all own templates into the templatecache.

(scan add-on template directory, search for .html files, read them and insert them into the templatecache)

On add-on export, the same thing happens again and stores them into the add-on xml file.

The benefits are, you can use a HTML IDE for the html editing and you can use a repository (svn,git) if you're working in an team.

Hope you know what i mean:/
The issue is that XenForo doesn't use raw HTML templates, they have to go through an extensive compilation process before they are usable, and that is done at save-time.
 

Jeremy

Well-known member
#27
WebDAV is just a protocol that sits on top of HTTP and presents a resource in the form of a file, so you would be able to download all the templates via WebDAV and commit them to SVN from the downloaded location, if you wanted to do that?

I'm not sure of the implementation you have in mind, can you outline how you'd see it working from a user perspective?
As ragtek, mentioned, but since it only represents data AS files and doesn't actually create files, I don't think this would be feasible... :(
 

Kier

XenForo Developer
Staff member
#28
As ragtek, mentioned, but since it only represents data AS files and doesn't actually create files, I don't think this would be feasible... :(
Creating files to work with is the job of the WebDAV client. For example, Dreamweaver maintains a local copy of all WebDAV assets it's working with.
 

Jeremy

Well-known member
#29
Creating files to work with is the job of the WebDAV client. For example, Dreamweaver maintains a local copy of all WebDAV assets it's working with.
Hm... So if a local copy is kept, it in theory could be incorporated to be in a SVN directory (removing from SVN those that are XenForo default) and if the site is set up correctly, every time you save, SVN notices a change, and marks it as such (it may have to be a separate "project"/site in Coda...) and when its saved, it might auto-upload to XenForo via WebDAV... Mentioning that, it might be feasible, but I'm not 100% sure I could set it up correctly. lol. This is also under the assumption that webDAV files could be uploaded automatically via Local -> webDAV... But I think it could be accomplished. lol. Now, if I had SVN to test this out. lol
 

Kier

XenForo Developer
Staff member
#32
Anyone know how to connect webdav up on a htaccess protected domain? Seems to be struggling to connect and I didnt really want to remove htaccess auth before we're ready :(
I don't believe that's actually possible, as both htaccess and WebDAV use HTTP Basic Auth.
 

Luke F

Well-known member
#34
I'm not sure if this is unique to me or not, but to get the WebDAV working on nginx I had to add the following rewrite:

Code:
rewrite ^/admindav.php /admindav.php;
And to access it using PhpED I simply set the hostname to my site domain and the root directory to /admindav.php/
 

SneakyDave

Well-known member
#39
Great explanation, thanks for the tips. Very flexible. The webDAV compatibility will save me a lot of errors copying and pasting into a TEXTAREA that I can't resize easily, and isn't syntax highlighted.

Kier, do you find yourself leaning toward Zend Studio for some types of development, and Eclipse PDT for others (or other IDE), or were you just using Zend Studio in these vids because "it was there"?

Just curious.