Announcement

#1 2012-08-15 20:50:03

Jeroen
Guest

Change description place

Hey Piwigo :)

I am using the stripped and blocks theme. Currently the description from an album gets presented on the left side of the images like this:

http://www.mediansoft.net/now1.jpg

I don't like this :( I made a quick mspaint edit to show how I would love to have it! (Please excuse the crudity of this model. I didn't have time to build it to scale or paint it.)

But this is how I want it :) A new box on top of the pictures (same box style as the footer)

http://www.mediansoft.net/future1.jpg

Ant piwgo wizard who knows how to do this ? I noticed the description gets called from whithin "index.tpl" instead of "picture.tpl" but can't get the box nor get the description on top of the pics :(

Thanks!
Jeroen

 

#2 2012-08-23 10:14:14

Jeroen
Guest

Re: Change description place

hmm, guess noone knows how to do this :(

 

#3 2012-08-23 11:39:40

flop25
Piwigo Team
2006-07-06
7037

Re: Change description place

Hello
I'm the author. Sry I didn't see your post.I will see if it's possible


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2012-08-23 13:42:12

flop25
Piwigo Team
2006-07-06
7037

Re: Change description place

I'm back ^^
As a personal plugin using Localfiles editor :

Code:

/************************************ index.tpl ************************************/
add_event_handler('loc_end_index', 'Jeroen_index');
function Jeroen_index()
{
    global $template;
    $template->set_prefilter('index', 'Jeroen_prefilter_index');
}
function Jeroen_prefilter_index($content, &$smarty)
{

  $search = '<div class="content_block"><div class="additional_info">';  
  $replacement = '<div><div class="additional_info">';
  $content = str_replace($search, $replacement, $content);
  return $content;
}

To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2012-08-29 22:28:54

Jeroen
Guest

Re: Change description place

Thanks for the help, Im not entirely sure how to change the code... I normally edit directly into the tpl files (aka, download the tpl file, change it, upload it to my ftp server and overwrite)

I do have localfiles editor installed but never used it and no idea how to do it... I did try to add the code block into my index.tpl file directly but it gives me a syntax error :(

 

#6 2012-08-29 23:39:24

flop25
Piwigo Team
2006-07-06
7037

Re: Change description place

flop25 wrote:

I'm back ^^
As a personal plugin using Localfiles editor :


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#7 2012-08-30 00:27:03

Jeroen
Guest

Re: Change description place

flop25 wrote:

flop25 wrote:

I'm back ^^
As a personal plugin using Localfiles editor :

I read that part :) I just don't know exactly what you mean :(

 

#8 2012-08-30 14:22:11

Jeroen
Guest

Re: Change description place

flop25 can you please explain in steps how to activate the code ? :)  (or someone else that knows what he wants me to do!)

 

#9 2012-08-30 14:32:59

flop25
Piwigo Team
2006-07-06
7037

Re: Change description place

In localfiles editor, you have a tab called Plugin or Personal plugin.


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2012-08-30 22:50:10

Jeroen
Guest

Re: Change description place

This is what I have in there:
http://www.mediansoft.net/plug.png

I take you are talking about "Locfiledit_onglet_plug" ? If so I tried pasting that in there and saving and it gives me:
"locfiledit_syntax_error"

 

#11 2012-08-30 22:55:49

flop25
Piwigo Team
2006-07-06
7037

Re: Change description place

Obviously the plugin is not well installed : download it here and send it trough ftp.


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#12 2012-08-30 23:30:25

Jeroen
Guest

Re: Change description place

Ok I reinstalled the plugin through ftp and now it "succesfully" added the code block you gave me.. however nothing at all changed :( my description is still on the left side as before.

 

#13 2012-08-30 23:31:55

Jeroen
Guest

Re: Change description place

This is what I have in the "personal plugin" tab now of the lcoalfiles editor:


----------------------------------
<?php
/*
Plugin Name: locfiledit_onglet_plug
Version: 1.0
Description: locfiledit_onglet_plug
Plugin URI: http://piwigo.org
Author:
Author URI:
*/

/************************************ index.tpl ************************************/
add_event_handler('loc_end_index', 'Jeroen_index');
function Jeroen_index()
{
    global $template;
    $template->set_prefilter('index', 'Jeroen_prefilter_index');
}
function Jeroen_prefilter_index($content, &$smarty)
{

  $search = '<div class="content_block"><div class="additional_info">'; 
  $replacement = '<div><div class="additional_info">';
  $content = str_replace($search, $replacement, $content);
  return $content;
}


?>
----------------------------------


It said this when submitting this code:
■File written successfully.
■Backup file created (plugins/PersonalPlugin/main.inc.bak.php)

 

#14 2012-08-31 00:25:50

flop25
Piwigo Team
2006-07-06
7037

Re: Change description place

Did you enabled it on the plugin page ?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#15 2012-08-31 00:47:12

Jeroen
Guest

Re: Change description place

Yes, on the "personal plugin" page...

Otherwise I can give you admin access to my piwigo and you can work your magic yourself :) maybe Im doing somethign wrong ?..

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact