Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#121 2005-12-10 05:14:54

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] bas_img_selector

Bastain,

This is a very useful plugin. I love the image preview stuff as it really helps my clients.

p.s. Is there an option for adding just the article id as the article image?


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#122 2005-12-10 14:44:57

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_img_selector

> Is there an option for adding just the article id as the article image?

No, but is should be done by an plugin like this:

<pre><code>
function bas_articleID_is_imgID() { global $thisarticle; $myAtts[‘id’] = $thisarticle[‘ID’]; //txp-image needs an array as $atts return image($myAtts); // calling the image function }

</code></pre>

Note: I don’t tested this one, it´s just on idea, but it should work in this general way

Scann around a little in /textpattern/publish/taghandlers.php
At Line 42 the image function starts and you can call this function, if you use an array for the $atts.

Do you need a plugin like this?

Last edited by Bastian (2005-12-10 14:46:44)

Offline

#123 2005-12-10 16:48:03

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] bas_img_selector

So as I understand it, this code will help me insert article id’s using your plugin?

In that case, can I include it inside your plugin (by editing it)?


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#124 2005-12-10 18:26:41

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_img_selector

No, it´s a new plugin.

No need to include that into bas_img_selector.

Because if you want to include a image with article`s ID into an article, you don´t need the selector.
In this case, there is nothing to select: Article´s ID is certain when showing the article.
Place the new plugin into article´s form.

But i don´t think that adding just the article id as the article image is a good methode to connect articles and images. Because for every article you have to save an image.
For article id=1 you need an image_id=1, for article id=2 you need an image_id=2, for article id=3 you need an image_id=3. And so on. Even if article id=‘4’ should not shown an image, you had to save an image id=‘4’ or article 5 and all articles following will break.

Not very flexible.

Offline

#125 2005-12-10 18:35:44

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] bas_img_selector

Sorry. I dont think I was clear enough. My department wants to dynamically assign images to the “article image” field. I want to use your plugin to insert only the article id no. instead of the entire path (/images/4t.jpg). Iam using txp:thumbnail and txp:article_image to control the position of images in an article. Referring to the id of an image during insertion of the images is a bit too much for the other authors in the website. I hope I was more clear this time.


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#126 2005-12-10 19:20:28

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_img_selector

I´m sorry, too. Perhaps my english is not the best or you are not clear enough.
But i don´t get it.

> I want to use your plugin to insert only the article id no.
The plugin don’t insert the article id. Perhaps you mean image id?

Please try again to explain me want you want to to or perhaps you have an url.
I´m slow but somethimes i get it :)

Offline

#127 2005-12-10 19:49:11

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] bas_img_selector

Hey, I found out what went wrong. Your plugin works just fine. I was an ass. :)

When I select the thumbnail option i get an output like this >> “/images/4t.jpg” but I was looking for only the image ID. I realised that I dont have to select a thumbnail to insert the image ID. (It works just fine by selecting the “Original” image option. Sorry for the confusion!

Last edited by creativesplash (2005-12-10 19:54:40)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#128 2005-12-10 20:11:13

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_img_selector

> When I select the thumbnail option i get an output like this >> ”/images/4t.jpg”

Thats because <code><txp:article_image /></code> uses txp-images if a numeric value is given and uses the path when a path is given. But <code><txp:article_image /></code> dont support thumbails, so bas_img_selector gives the path for thumbnails.

> Sorry for the confusion!
No matter.

Offline

#129 2005-12-10 20:18:51

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] bas_img_selector

Can you tell me where this plugin can be downloaded? The link here is dead, and the link here appears to be a download of Textpattern itself. ?

Does your plugin work for 4.0.2?

Offline

#130 2005-12-10 21:03:44

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_img_selector

Sorry, i posted the link in my “i have updated.post” onyl. i updated the first post in thsi thread, but textpattern.org i cant update, because i´m not the author of that one.

Download

> Does your plugin work for 4.0.2?
Should

Offline

#131 2005-12-11 01:17:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] bas_img_selector

Thanks. :)

Edit: and oh, by the way, you can’t re-license your plugins. :( They’re already under GPL. Just thought I’d mention it in case you weren’t aware.

Last edited by Mary (2005-12-11 01:20:09)

Offline

#132 2005-12-11 14:35:10

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_img_selector

Mary, i made some thoughts about licensing, while creating bas_emff. The flash player is gpl and i read something about gpl and cc and their incompatible.
But i don´t know that txp plugins are under gpl.

I just choosed cc, because i want to have an license for my whole page and gpl is for software and docs, isnt?

How do you manage copyright and you site?

Edit: Removed that CC stuff

Last edited by Bastian (2005-12-16 15:43:53)

Offline

Board footer

Powered by FluxBB