Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2004-11-17 20:10:38

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

The downloads are also logged within Txp. I plan on making it support clean urls as well, where either the ID or the Filename can be used in the url to download the file.

Offline

#32 2004-11-17 20:49:01

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: Mod File Upload

I just chatted with Manfre about getting this plugin to work under 1.0rc1 and got good help, so I thought I’d spare him some tech support time by posting this little tip (that solved it for me):

If you get an error using the first of the three examples under the plugin info section (<txp:mem_file_link id=“1” />), try using the third one instead (<txp:mem_file_link id=“23”>The link text goes here</txp:mem_file_link>) since that one works well. The first one will work in a future release, IIRC.

thanx,

/Anton

Offline

#33 2004-11-17 20:49:21

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

Yes I spotted you could do that but I don’t bother with logging in TXP as I run both Referer and Shortstat. Just seemed a bit OTT to me. I like being able to view these 2 applications at any time without having to be “logged-in”.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#34 2004-11-23 14:07:11

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: Mod File Upload

The download link for the mod doesn’t seems to be working for me. Help!

Offline

#35 2004-11-23 15:03:59

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

It’s working now. I had added the shortstat include line to the file to have more logging, but that was preventing downloads from happening (for whatever reason).

Offline

#36 2004-11-23 15:22:10

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

Seems odd. I have the include added to my download.php file. It’s added at the end within it’s own PHP tags. I’m not having any problems with it.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#37 2004-11-23 15:30:14

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

I had it towards the top of the page. It might be outputting headers, which would cause problems if they appear before the headers I emit.

Offline

#38 2004-11-23 15:39:42

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

I’m trying to pick up PHP as I go but every time I learn something it just seems to get more complicated! :grin:


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#39 2004-11-23 15:51:02

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

The funny part is that I really don’t know PHP either. I never really used it until Txp.

Offline

#40 2004-11-23 15:52:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

Snap!


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#41 2004-12-08 13:48:59

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Mod File Upload

> Anton wrote:

> If you get an error using the first of the three examples under the plugin info section (<txp:mem_file_link id=“1” />), try using the third one instead (<txp:mem_file_link id=“23”>The link text goes here</txp:mem_file_link>) since that one works well. The first one will work in a future release, IIRC.

Anton – Could you go into this a bit further? Where are these 3 examples in what ‘plugin info section’? At the moment I can’t access the admin section (presumably because I’m using this with RC1).

Last edited by jonhicks (2004-12-08 13:49:52)


Cheers,
Jon VC#9

Offline

#42 2004-12-08 15:04:24

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

jon, for RC1, you can’t use the single tag format for the plugin (the one that ends with />) because of the way that RC1 handles tags compared to how RC2 handles them. You instead would have to use the long format (<txp:mem_file_link link="1">Click To Download</txp:mem_file_link>) instead.

The plugin info section is the ‘plugin’ tab under the ‘Admin’ tab. It is the page where you install and enable plugins. Clicking on one of the plugin names will bring up the plugin code and display the plugin’s help below the code box.

You probably cannot access the admin section because of the modifications to the “txp_prefs.php” page. Turn on error reporting for that file by adding the following code towards the top of it.

<code> error_reporting(E_ALL);</code>
<code>ini_set("display_errors","1");</code>

Offline

#43 2004-12-08 16:43:49

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Mod File Upload

Hi Manfre – I tried adding that code, but still no errors are reported. Maybe I should just bite the bullet and update to RC2? I’m not worried about having to use the long tag format though, just need to access admin and install the plug-in part of the mod.


Cheers,
Jon VC#9

Offline

#44 2004-12-08 17:11:39

zmeigorin
New Member
From: Moscow
Registered: 2004-11-12
Posts: 6

Re: Mod File Upload

To make the plugin work with RC1, simply change <code>$atts</code> to <code>$atts = null</code> in its first line.

Offline

#45 2004-12-13 18:05:01

dbulli
Member
Registered: 2004-11-22
Posts: 195
Website

Re: Mod File Upload

Manfre… has anyone told you that they love you ?!

Worked like a charm, except the “CREATE TABLE” kept on failing, not sure why, but took me awhile to track down that was the problem. I was able to create the table from the command line, but I wanted to see what problem was, I am not sure what or why this is true, but i changes single quotes and took out latin stuff.

<pre>
<code> $sql = “CREATE TABLE `txp_file` ( “ . “ `id` INT NOT NULL AUTO_INCREMENT ,” . “ `filename` VARCHAR NOT NULL ,” . “ `category` VARCHAR NOT NULL ,” . “ `permissions` VARCHAR DEFAULT ‘0’ NOT NULL ,” . “ `description` VARCHAR NOT NULL ,” . “ PRIMARY KEY ( `id` ) ,” . “ UNIQUE ( `filename` ) ) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=15 “;
</code>
</pre>
Now that it’s install, could i conceivably comment out “file_install()” ??

question : “how to force line breaks in textile so SQL doesn’t end up one line?”

update : doh! <code>< pre> tag</code>

Last edited by dbulli (2004-12-13 18:09:51)


nuff-respec ::: dannyb

Offline

Board footer

Powered by FluxBB