Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#151 2004-11-06 15:36:41

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Re: Plugin/Hack: Albumpattern

Id like to see if this can be done too! :)

Offline

#152 2004-11-07 20:01:07

jase
Member
Registered: 2004-10-25
Posts: 10
Website

Re: Plugin/Hack: Albumpattern

laigus,

have you adjusted the first line in the albumpattern_sql.php file? you should see a variable definition there at the top:

  • $path_to_txp_config

you’ll need to hardcode …/primecms inplace of the default …/textpattern dir.

Offline

#153 2004-11-08 03:58:15

streetdaddy
New Member
From: Adelaide, Australia
Registered: 2004-06-01
Posts: 8

Re: Plugin/Hack: Albumpattern

I’m having some problems with the album_image page. All other album pages are ok.

I’m sure I’ve setup everything correctly, however when I go to view an image it doesn’t use the album_image form I’ve created. The album_single form provides this link to a single image:

http://www.streetdaddy.com/index.php?id=34&a=2&p=34

which doesn’t use the album_image form… Just seems to use the default form in textpattern.

however if I manually add &s=Gallery to the url:

http://www.streetdaddy.com/index.php?id=34&a=2&p=34&s=Gallery

then it DOES use my album_image form.

Any thoughts?

Last edited by streetdaddy (2004-11-08 03:59:32)

Offline

#154 2004-11-08 04:57:50

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: Plugin/Hack: Albumpattern

> laigus wrote:

> I think that albumpattern_sql.php is ONLY needed for db table setup.
> After setup db table I have delete it from the distribution.:-)

> I am too confused.
> May anyone help me to achieve albumpattern installation (or he/she
> does it on my server!)
> I offering a text link on my sites geodigest.com and techubic.com for
> FREE.

What exactly isn’t working? The plugin portion, with forms and the stuff viewers of your website see, or the internal administration part?

Changing the name of the textpattern folder shouldn’t matter, assuming that your configuration files are setup properly to take that into account.

Offline

#155 2004-11-08 05:54:59

robbie
New Member
From: Durham NC
Registered: 2004-09-26
Posts: 5

Re: Plugin/Hack: Albumpattern

Jase,

You could probably use the textile image tag
<code>!images/path!</code>
pointed to the image in your server’s directory structure.

I can’t think of an easier way to make it work.

Rob

> jase wrote:

> can anyone outline for me how to use an image from albumpattern in a textpattern article? i’d rather not upload the same image twice, once in albumpattern for an album image, and once again for a photo blog post…

i installed the rei_show_custom plugin, added < txp:albumpattern / > to my article form. then tried to call:

  • < txp:ap_image id=”< txp:rei_show_custom customid=“2” / >” / >

apparently, you can’t use a tag as a value of an attribute for another tag… how can i pass into < txp:ap_image id=”???” / > the ID data contained in a custom field?

Last edited by robbie (2004-11-08 05:57:44)

Offline

#156 2004-11-08 08:47:15

jase
Member
Registered: 2004-10-25
Posts: 10
Website

Re: Plugin/Hack: Albumpattern

laigus,
i too changed the textpattern default dir name and to make the CSS work, i did this:

  • in ../publish/taghandelers.php: find function css() [around line 29]

and fix the path info to whatever you call your textpattern dir on lines 33 & 34…

- – - – - – - – - – - – - – -

robbie, martagnan,

thanks for the suggestion! i was hoping for a more automatic solution— somehow dreaming for albumpattern to myteriously and seamlessly connect with the rest of textpattern, but maybe in future versions…

this is what i came up with:
using two custom fields, one for the image path (albumName/imagename) with NO extention, and the other custom field for album ID number. i chose to not capture extension, but it doesn’t matter as long as you code your form accordingly; all my images (photos) are and will be jpegs.

i then made part of my default article form look like this:

< txp:if_individual_article>

< txp:swf_if_not_empty field=“article_image”>
< div class=“photo”>< txp:zem_article_image />< /div>
< /txp:swf_if_not_empty>
if there’s a regular_non-albumpattern image, load it here

< txp:jim_custom_not_empty customid=“1”>
< div class=“photo”>< img src=”/images/< txp:rei_show_custom />.jpg” alt=”< txp:title />” title=”< txp:title />” border=“1” />< /div>
< /txp:jim_custom_not_empty>
if there’s data in custom_1 filed, process it (image path data)

< txp:jim_custom_not_empty customid=“2”>
< p class=“aplink”>view < a href=”/photos/< txp:rei_show_custom customid=“2” />”>associated photo album< /a>< /p>
< /txp:jim_custom_not_empty>
if there’s data in custom_2 filed, process it (album ID)

< txp:body />
< /txp:if_individual_article>

plugins used to accomplish this:

i’d love to see the ability to be able to select an image and/or an album from a pulldown menu in the articles area rather than having to hand enter the image path data and album ID, sort of like how categories are selected.

- – - – -

edit: formatting, typos, the usual…

Last edited by jase (2004-11-08 09:02:24)

Offline

#157 2004-11-09 21:50:16

jbrew
Member
From: Imperial Beach, California
Registered: 2004-03-04
Posts: 78
Website

Re: Plugin/Hack: Albumpattern

Just when you think its safe….

I just lost all of my photos and I get the blue box with a question mark for each photo and then this wonderful warning showed up when I went to my articles page:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/starbeck/public_html/textpattern/lib/txplib_db.php on line 106

Does anyone know why this is happening and how I can fix it?

A nearly completed project is in limbo…. please help!


To even the least of these…

Offline

#158 2004-11-09 23:17:57

streetdaddy
New Member
From: Adelaide, Australia
Registered: 2004-06-01
Posts: 8

Re: Plugin/Hack: Albumpattern

I’ve simply added a bit to the ap_createPermlink function:

function ap_createPermlink($album_id,$album_title=’‘,$image_id=’‘,$image_title=’‘) { global $pfr,$s, $url_mode;

if($url_mode == 1) { $out[] = $pfr.$s; $out[] = (!empty($album_id)) ? ‘/’.$album_id : ‘’; $out[] = (!empty($album_title)) ? ‘/’.$album_title : ‘’; $out[] = (!empty($image_id)) ? ‘/’.$image_id.’/’ : ‘’; $out[] = (!empty($image_title)) ? $image_title : ‘’; } else { $out[] = $pfr.‘index.php?’.(($image_id) ? ‘id=’.$image_id : ‘s=’.$s).a; $out[] = ‘a=’.$album_id.’&s=Gallery’; //manually added the section myself… $out[] = (!empty($image_id)) ? a.‘p=’.$image_id : ‘’; }

return implode(‘’,$out); }

Not the best solution I know, but it works…

> streetdaddy wrote:

> I’m having some problems with the album_image page. All other album pages are ok.

I’m sure I’ve setup everything correctly, however when I go to view an image it doesn’t use the album_image form I’ve created. The album_single form provides this link to a single image:

http://www.streetdaddy.com/index.php?id=34&a=2&p=34

which doesn’t use the album_image form… Just seems to use the default form in textpattern.

however if I manually add &s=Gallery to the url:

http://www.streetdaddy.com/index.php?id=34&a=2&p=34&s=Gallery

then it DOES use my album_image form.

Any thoughts?

Last edited by streetdaddy (2004-11-09 23:18:49)

Offline

#159 2004-11-10 04:07:49

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: Plugin/Hack: Albumpattern

jbrew : What did you do to immediately before this started happening? Something went horribly wrong in your database, I would look into that. Are your TXP articles still there too?

streetdaddy: For some reason messy URL’s are acting weird on my local install of TXP. I’m trying to figure out why it isn’t working.

Offline

#160 2004-11-10 04:13:13

streetdaddy
New Member
From: Adelaide, Australia
Registered: 2004-06-01
Posts: 8

Re: Plugin/Hack: Albumpattern

thanks greenrift,

For now I’ve changed the ap_createPermlink function to append ‘&s=$s’ to the end of the permlink when in messy mode and that is doing the job for now… I haven’t had a good search for the source of the problem, hopefully you have some success finding it ;) If you need access to my TXP to test stuff out let me know and I’ll pass on access details…

I’m going to be purchasing a TextDrive account in the next few weeks and will finally be able to use clean urls! Unfortunately my current shared hosting environment doesn’t support mod_rewrite…

Offline

#161 2004-11-10 06:02:11

jbrew
Member
From: Imperial Beach, California
Registered: 2004-03-04
Posts: 78
Website

Re: Plugin/Hack: Albumpattern

Greenrift, thanks for the reply and I am a bit worried that “something went horribly wrong in my database.”

The last thing I did before that was to change a few pages HTML and attempt to put my working AP example into the sites design. Both Articles and the AP stuff gets that same error report. Before that I had just installed the QwikPic hack/plugin…

Unfortunately, I am a MySQL novice and wouldn’t know where to look at all to begin the repairs, other than using cPanel’s repair Database.

Am I screwed? Will I have to re-install everything???


To even the least of these…

Offline

#162 2004-11-12 20:56:59

slabanosa
Member
From: Silva Carbonaria
Registered: 2004-06-01
Posts: 57

Re: Plugin/Hack: Albumpattern

this is certainly stupido, but I’m stuck on step 9 of the install where it reads:
Open albumpattern_sql.php, edit the $path_to_txp line. Upload and run.
what would that path be on textdrive? and where/how do I upload and run this thing ?

- Edit -
guess a good night of sleep helps find these things …

Last edited by slabanosa (2004-11-14 08:40:49)

Offline

#163 2004-11-15 21:15:39

slabanosa
Member
From: Silva Carbonaria
Registered: 2004-06-01
Posts: 57

Re: Plugin/Hack: Albumpattern

so I managed to make it work for me, and it’s a great plugin. there are 2 ltlle quirks I can’t fix though in my gallery first one how do I sort albums ? tried asc desc posted no change I’m puzzled… I need to order these and they seem to always be arranged by name.
second concern: in the albums I use txp:ap_prev_image to navigate the album and in some albums one name/link is skipped. tried deleting the album and recreate it to solve both issues, hasn’t changed a thing: the album is again on top of list and if you enter it through image 1 you won’t get image 4 and vice versa. anybody with an idea ?

Offline

#164 2004-11-16 06:38:41

sivni
Gone, but not forgotten
From: Norway, Hamar
Registered: 2004-10-27
Posts: 39

Re: Plugin/Hack: Albumpattern

Wow! What a fantastic plugin!

I have been trying out all kinds of php gallery software, but little did I know that there was such a brilliant plugin available. I am truly impressed. Square thumbnails, excellent descriptions integrated in txp and just plain fun to work with.

Thanks a lot!

Offline

Board footer

Powered by FluxBB