Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 ... 5 6 7 8 [9] 10   Go Down

Author Topic: copy/ paste bbcode img URL below intermediate image  (Read 299215 times)

0 Members and 1 Guest are viewing this topic.

Jixzer

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #160 on: February 25, 2009, 04:25:23 am »

I guess I'm just impatient.  I looked over the code, and though I'm no programmer, I set up a BBcode that would work on my site and implemented it into the plugin given.  Also, I only really wanted this so that users could embed their gallery entries into the forums.  Here's what I did:

Code: [Select]
<?php
/**************************************************
  CPG BB Code Plugin for Coppermine Photo Gallery 
  Modified by Zachary Barnes of UselessHacks.com
Now creates html tags instead of BB
  *************************************************
  Copyright (c) 2006 Thomas Lange <stramm@gmx.net>
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  *************************************************
  Coppermine version: 1.4.9
  BB Code Plugin version: 1.2
  $Revision: 1.0 $
  $Author: stramm $
***************************************************/


if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

// Add a filter
$thisplugin->add_filter('file_data','bbcode_add_data');


function 
bbcode_add_data($pic_data){ //$pic_data
global $CONFIG;

//Javascript to hide hotlinking information along with div arrangement, taken from a common toggling script floating around the net
$script_data = <<< EOT

<script language="javascript" type="text/javascript">
<!--
function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}
//-->
</script>

<br><a href="javascript:toggleLayer('hotlinking');" title="View Hotlinking Information">View Hotlinking Information</a>
<div id="hotlinking" style="display: none; margin: 0px 20px 0px 20px;">

EOT;
    
    
$thumb_url get_pic_url($pic_data'thumb');  //here we grab the url to the thumb url
$int_url get_pic_url($pic_data'normal');  //intermediate pic
$full_url get_pic_url($pic_data'fullsize');            //fullsized pic
$pic_data['title'] ? $name $pic_data['title'] : $name 'No&nbsp;Title'//checking if the pic has a title, if not we set it to 'No title'

//Generating the file paths for each picture size

$fs_url '&#38;#91;img&#38;#93;'.$CONFIG['ecards_more_pic_target'].$full_url.'&#38;#91;&#38;#47;img&#38;#93;';
$ve_url '&#38;#91;flv&#38;#93;'.$CONFIG['ecards_more_pic_target'].$full_url.'&#38;#91;&#38;#47;flv&#38;#93;';
//this just brings everything in form... we create a table etc., 

$bbcode_data $script_data;
$bbcode_data .= '<table align="center" width="600">';

//thumbnail image code with link to intermediate image
$textarea_prop 'name="bbcode" rows="1" cols="75" style="overflow:off; white-space:nowrap" readonly="readonly"';

//fullsize image code
$bbcode_data .= '<tr><td>Fullsize:</td></tr>';
$bbcode_data .= '<tr><td><textarea '.$textarea_prop.'>'.$fs_url.'</textarea></td></tr>';

//video embed code
$bbcode_data .= '<tr><td>Video Embed Code:</td></tr>';
$bbcode_data .= '<tr><td><textarea '.$textarea_prop.'>'.$ve_url.'</textarea></td></tr>';

//closing table and visiblity div
$bbcode_data .= '</table></div>';



//finally we add the created stuff to the picture data and return it to coppermine
$pic_data['html'] = $pic_data['html'].$bbcode_data

return $pic_data
}

?>


Basically, I removed the entire thumbnail string and added an extra variable specifically for my FLV files.  As I allow more video formats, I'll increase the options.  Granted, it's not the most flexible, but it's easy and functional for my users.  :)
Logged

Jixzer

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #161 on: February 25, 2009, 04:26:16 am »

Oh, sorry, for an example you can go to http://www.freakingamers.com/gallery/
Logged

tapety_net

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #162 on: February 28, 2009, 04:38:42 pm »

Hello,

I need modification of bbcode, not like plugin but copy/paste in theme.php in specific place,on intermediate page, below CAPTION, i need:
1. title
2. caption
3. bbcode
4. vote......

Code: [Select]
// HTML template for intermediate image display
$template_display_media = <<<EOT
...
...
...
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                                {BBCODE} --------------------- how to make this <<<<<<<<<<<<<<<<<
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>
EOT;
Logged

xfantasy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #163 on: March 21, 2009, 05:42:55 am »

Hello guys , i was modify this code for my consuming. I hope that some one gona like...

Code: [Select]
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

// Add a filter
$thisplugin->add_filter('file_data','bbcode_add_data');


function bbcode_add_data($pic_data){ //$pic_data
global $CONFIG;

$script_data = <<< EOT

EOT;

$thumb_url = get_pic_url($pic_data, 'thumb');  //here we grab the url to the thumb url
$full_url = 'displayimage.php?pos=-'.$pic_data['pid']; //fullsized pic
$pic_data['title'] ? $name = $pic_data['title'] : $name = 'No&nbsp;Title'; //checking if the pic has a title, if not we set it to 'No title'

//here we define the actual bbcode coppermine path + the path to the pic $img_url is for the version that displays the thumb, $name_url is for a txt link with the ikmage title
    $thu_url = '[url='.$CONFIG['ecards_more_pic_target'].$full_url.'][IMG]'.$CONFIG['ecards_more_pic_target'].$thumb_url.'[/IMG][/url]';
    $im_url = '&lt;a&nbsp;href="'.$CONFIG['ecards_more_pic_target'].$full_url.'"&gt;&lt;img&nbsp;src="'.$CONFIG['ecards_more_pic_target'].$thumb_url.'"&nbsp;alt="'.$name.'"&nbsp;/&gt;&lt;/a&gt;';

//this just brings everything in form... we create a table etc.
$bbcode_data = '<table align="center" width="'.$CONFIG['picture_width'].'">'.$script_data.'<tr>';

$bbcode_data .= '<td>Grab Thumbnail For Forum :</td>';
    $bbcode_data .= '<tr><td><textarea name="bbcode" rows="1" cols="50" wrap="off" style="overflow:hidden;height:15px;" onfocus="this.select();" onclick="this.select();">'.$textarea_prop.''.$thu_url.'</textarea></td></tr>';
$bbcode_data .= '</tr><tr>';
$bbcode_data .= '<td>Grab Thumbnail For Blog :</td>';
    $bbcode_data .= '<tr><td><textarea name="bbcode" rows="1" cols="50" wrap="off" style="overflow:hidden;height:15px;" onfocus="this.select();" onclick="this.select();">'.$textarea_prop.''.$im_url.'</textarea></td></tr>';

$bbcode_data .= '</tr></table>';

//finally we add the created stuff to the picture data and return it to coppermine
$pic_data['html'] = $pic_data['html'].$bbcode_data;

return $pic_data;
}
?>

Any comment or suggestion well be helpful  ;)
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #164 on: March 21, 2009, 09:25:43 am »

Any comment or suggestion well be helpful  ;)

If so:

  • Post details about the modification and benefit of using your modificated mod.
  • Attach a screenshoot if useful.
  • Post a link to a live demo of it.
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

xfantasy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #165 on: March 21, 2009, 11:06:25 am »

ok

code description :

1. code showing thumbnail links to add image in forum or blog (my requirement of gallery)
2. when visitor press on it link is highlited ,rigth click copy
3. thumbnail hotlink redirect visitors to gallery where image is posted ( displayimage.php?pos=- )

i just wont to add that i don't know coding , but i was reading topic from beginning. after some time
and mixing couple code of other users i find way to sort proper code what i was looking for.

P.S. i have problem with coper_ad, can any one help me? ???
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #166 on: March 23, 2009, 07:06:33 pm »

P.S. i have problem with coper_ad, can any one help me? ???
Definitely not in this thread. Respect board rules!
Logged

bb3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #167 on: March 26, 2009, 01:59:53 pm »

hi there

is there any way of changing the location of bbcode? I want to place it outside the image border.
I want to place it outside the black area. thanks in advance!

here's a link
http://redlens.org/gallery/displayimage.php?album=lastup&cat=0&pos=1
Logged

bb3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #168 on: March 27, 2009, 03:17:56 am »

hi there

is there any way of changing the location of bbcode? I want to place it outside the image border.
I want to place it outside the black area. thanks in advance!

here's a link
http://redlens.org/gallery/displayimage.php?album=lastup&cat=0&pos=1

Please ignore my query. I found the solution

Find
Code: [Select]
$pic_data['html'] = $pic_data['html'].$bbcode_data
Change to
Code: [Select]
$pic_data['menu'] = $pic_data['menu'].$bbcode_data
Logged

crow5716

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
    • Bouncing Trucks
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #169 on: May 31, 2009, 01:20:20 am »

so what value can you use if you are not in an image view. but rather in the album view. how can i pull in the url to my text boxes. just read through this whole post. but $img_url, $pic_url, and $thumb_url are all coming up blank.

here's a link to the page i'm trying to do this on. pretend it's not ugly i haven't skinned it yet

http://bouncingtrucks.com/gallery/thumbnails.php?album=2

i want it to look like the gallery i have now, but i'm trying to do it through coppermine now

here's my current gallery

http://bouncingtrucks.com/Trucks_Chevy_1.html

thanks

-crow
Logged

fotografi

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #170 on: August 29, 2009, 02:59:55 am »

Any idea how to add these fields in the File information area, under "Favorites:   Add to Favorites"?!

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #171 on: August 29, 2009, 08:17:00 pm »

search the plugins board for an alternative plugin

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: copy/ paste bbcode img URL below intermediate image v1.1
« Reply #172 on: August 30, 2009, 12:59:04 pm »

Any idea how to add these fields in the File information area, under "Favorites:   Add to Favorites"?!



yep, use this plugin. HTML Embedding Plugin
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

ligerzero

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: copy/ paste bbcode img URL below intermediate image
« Reply #173 on: February 08, 2010, 04:39:52 am »

hi there. im trying to get an flv embedded on my site, but Jixzer one is broken

the outcome comes out like ths

&#91;flv&#93;http://www.ligerzero.net/coppermine_test/albums/uploads/Videos/motorsports/YouTube-_Hyla_Breese_near_miss_.mp4&#91;&#47;flv&#93;

anyone help pls? thanks
Logged

aftab1003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 67
    • PictureRating Site for Teens
Re: copy/ paste bbcode img URL below intermediate image
« Reply #174 on: February 17, 2010, 12:29:34 pm »

thanks for the plugin

i install it and works fine with direct link ( hot link )

is there any way to genrate the bbcode with thumnail, or any size with link to intermed image page not to direct image link ( no hot link )

thanks in advance
Logged

Jinjo52

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: copy/ paste bbcode img URL below intermediate image
« Reply #175 on: August 15, 2010, 10:20:48 pm »

Got a Problem with my bbcode when i want to link my images i am not able to see them on communitys i says then " Externes Bild kann nicht angezeigt werden"
bute the image code shpuld be right here you got: (http://www.jpic.eu/) does anbody know what is wrong or is it because of disallowed hotlinking?how to activate that a few weeks before the links where functional.
Regards Phil
Logged

Jinjo52

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: copy/ paste bbcode img URL below intermediate image
« Reply #176 on: August 15, 2010, 11:31:47 pm »

Got a Problem with my bbcode when i want to link my images i am not able to see them on communitys i says then " Externes Bild kann nicht angezeigt werden"
bute the image code shpuld be right here you got: (http://www.jpic.eu/) does anbody know what is wrong or is it because of disallowed hotlinking?how to activate that a few weeks before the links where functional.
Regards Phil


Sry got already fixed it i took html embed and modified the code that its running for all communitys thanks anyway for the opertunity to use coppermine for free and realy nice treads i found here .
weiter so Webbi.
Logged

CoppermineUser99

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: copy/ paste bbcode img URL below intermediate image
« Reply #177 on: July 14, 2011, 01:58:28 am »

First, I would like to say thanks for creating this module and for helping to provide tech support for it.

Is there a way to have the BBCode appear in a popup javascript window (instead of appearing under the intermediate photo)?

Will I have to create a new php page and pass variables to it? Will I have to use any include statements to get any global variables?

(I am sure I can find the actual code to make a window open using javascript on the web somewhere. My concern is how I would pass the variables - and which ones I will have to pass - to the popup window.)

Thanks in advance, and I apologize if this has already been covered. I searched for it in this thread but didn't see it.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: copy/ paste bbcode img URL below intermediate image
« Reply #178 on: July 14, 2011, 02:30:23 pm »

Unfortunately, support for CPG 1.4.x ended last year. You should upgrade to the new 1.5.x line where this plugin is also available. Also there is the superb EnlargeIT plugin whis displays images in a nice JS popup with and has a bbcode button included in the popup.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

alexor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
Re: copy/ paste bbcode img URL below intermediate image
« Reply #179 on: August 12, 2011, 04:40:58 pm »

Where can i find this plugin for  1.5.*** ?
Was using search, but didn't find it
Logged
Pages: 1 ... 5 6 7 8 [9] 10   Go Up
 

Page created in 0.034 seconds with 23 queries.