copy/ paste bbcode img URL below intermediate image - Page 9 copy/ paste bbcode img URL below intermediate image - Page 9
 

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

Main Menu

copy/ paste bbcode img URL below intermediate image

Started by Stramm, September 16, 2006, 07:16:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jixzer

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:


<?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.  :)


tapety_net

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......


// 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;

xfantasy

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

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  ;)

Fabricio Ferrero

Quote from: xfantasy on March 21, 2009, 05:42:55 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.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

xfantasy

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? ???

Joachim Müller

Quote from: xfantasy on March 21, 2009, 11:06:25 AM
P.S. i have problem with coper_ad, can any one help me? ???
Definitely not in this thread. Respect board rules!

bb3

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

bb3

Quote from: bb3 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

Please ignore my query. I found the solution

Find
$pic_data['html'] = $pic_data['html'].$bbcode_data

Change to
$pic_data['menu'] = $pic_data['menu'].$bbcode_data

crow5716

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

fotografi

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


Stramm

search the plugins board for an alternative plugin

lurkalot

Quote from: fotografi 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"?!



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

ligerzero

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

aftab1003

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

Jinjo52

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: (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.jpic.eu%2F&hash=2e56b481b1d0b7164a14abc1a9c14ea53885e2e1) 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

Jinjo52

Quote from: Jinjo52 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: (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.jpic.eu%2F&hash=2e56b481b1d0b7164a14abc1a9c14ea53885e2e1) 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.

CoppermineUser99

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.

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

alexor

Where can i find this plugin for  1.5.*** ?
Was using search, but didn't find it