Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#157 2004-11-08 08:47:15
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>
- swf_if_empty
- jim_custom_not_empty (look for jimb’s post… this is a bit of a do-it-yourself plugin)
- rei_show_custom (which you need to install anyway to use the custom fileds)
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
#158 2004-11-09 21:50:16
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
#159 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
#160 2004-11-10 04:07:49
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
#161 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
#162 2004-11-10 06:02:11
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
#163 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
#164 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
#165 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
#166 2004-11-16 11:51:04
- rajo
- Member
- Registered: 2004-03-13
- Posts: 43
Re: Plugin/Hack: Albumpattern
I thought I had installed this okay but I guess I haven’t. I’ve gotten through all of the install instructions (including the optional parts) but when I go to my “albums” tag I get the following errors in the head.
Warning: main(/lib/mdp_lib.php): failed to open stream: No such file or directory in /home/kreuel/www/www/textpattern/include/txp_album.php on line 8
Warning: main(): Failed opening ‘/lib/mdp_lib.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /home/kreuel/www/www/textpattern/include/txp_album.php on line 8
Warning: main(/lib/classImageManipulation.php): failed to open stream: No such file or directory in /home/kreuel/www/www/textpattern/include/txp_album.php on line 9
Warning: main(): Failed opening ‘/lib/classImageManipulation.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /home/kreuel/www/www/textpattern/include/txp_album.php on line 9
I’m running RC2, if anyone can help I would greatly appreciate it.
Last edited by rajo (2004-11-16 11:51:25)
Offline
#167 2004-11-16 17:24:32
Re: Plugin/Hack: Albumpattern
Are you positive that classImageManipulation.php and mdp_lib.php are your in textpattern lib directory?
Offline
#168 2004-11-16 18:44:31
- rajo
- Member
- Registered: 2004-03-13
- Posts: 43
Re: Plugin/Hack: Albumpattern
yes, I am positive they are. Also when I try to go to album preferences I get this additional error.
Fatal error: Call to undefined function: get_sections() in /home/kreuel/www/www/textpattern/include/txp_album.php on line 1032
Offline