Coppermine Forum Plugin (cpgforum) - Page 8 Coppermine Forum Plugin (cpgforum) - Page 8
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Coppermine Forum Plugin (cpgforum)

Started by foulu, April 01, 2008, 07:46:11 AM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

Αndré

fabri.. read nielsp's question carefully:
Quote from: nielsp on June 04, 2008, 06:36:55 PM
When I restrict the forum to registered users, guests still can see the forums and topics. Only when they try to post an message or open a topic they'll get an errorscreen.
this is the behavior of "don't allow guests to browse the forum".. they can browse the forum anyway.. the only thing they don't can is reading the posts..

i think this should be reworked and won't be done by hiding the link to the forum


-
muu

Fabricio Ferrero

I'm translating... Are you sure that this is ok?

'msg_remove_confirm' => "Are you sure to remove this message? This action can\'t be undone.",
'topic_remove_confirm' => "Are you sure to remove this message? This action can\'t be undone.",


The second one, it have don't to be "Are you sure to remove this topic?"

I'm not programmer and I'm not test the plugin yet, sorry if it is ok and it's a silly questions.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Αndré

no it's wrong.. i forgot to mention this as i translated it to german.. the first is "message" the second is "topic".. it should be adapted in english.php


dawid8

#143
so her is the link >delete<

if you need a account you can sent me a pm

Fabricio Ferrero

Spanish language file attached whit the error I mark 2 reply above corrected. (in zip)

Judgind by the language file, very complete plug in!!
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

dawid8

i have delete the english language file and it's working in german

pixstreet

Here is my Polish language file for cpgforum. I hope people find it useful

dawid8

Quote from: pixstreet on June 06, 2008, 02:59:55 PM
Here is my Polish language file for cpgforum. I hope people find it useful

Thanks

Αndré

#148
attached updated german language file (new entries for "cancel" and "msg_not_exists")


found some things in english.php:

line 83 & 90:
duplicate entry 'preview'

line 150:
'msg_not_exists' => "This message isn't exists.",
must be
'msg_not_exists' => "This message doesn't exist.",


-
muu

Αndré

#149
[edit 2008-07-09: updated code to make url's clickable and using custom user profile field 6 instead of 5 (to use line breaks)]
[edit 2008-07-05: updated code to use line breaks, smileys and bbcode tags]


to add a signature to user's posts, i modified 2 files of the cpgforum plugin..
i use the "custom fields for user profile" (in my example field 6)

1. open adaptor/source/topic.view.php
find:
echo template_eval($template, $vars);

add before:
        //begin signature by muu
        if ($user_data['user_profile6'])
          $signature = '<tr> <td class="tableb" colspan="3" valign="top"><hr width="200" size="1" align="left" />'.$user_data['user_profile6'].'</td> </tr>';
        else
          $signature = "";
        $vars['{SIGNATURE}'] =  make_clickable(process_smilies(bb_decode($signature)));
        //end signature by muu



2. open adaptor/include/themes.inc.php
find:
    <tr>
<td width="53%" align="left" colspan="2" valign="top">{LAST_EDIT}</td>
<td width="47%" align="right" valign="top">{MISC}</td>
    </tr>


add after:
    {SIGNATURE}


3. go to the cpg config and add a custom field for the signature


now users can set their signature in their profile


-
muu

MadMaxx

Quote from: eenemeenemuu on June 12, 2008, 07:25:44 PM
now users can set their signature in their profile

-
muu

works very nice, thanks
but how about a picture signature, hosted by imageshack or whatever
something like:
[IMG]http://img379.imageshack.us/img379/8173/yodafv6.jpg[/IMG]

i tried to put that in the signature field but it only shows the text not the linked picture.

Hein Traag

The idea is good but has a flaw, what if Imageshack goes down etc. It would be better to have the image stored on the same server as cpg imho.

ib2loud

I just did a quick install and everything seems to be working super smoothly for me...

www.okshowpics.com/free

Αndré

Quote from: MadMaxx on July 05, 2008, 11:49:47 AM
works very nice, thanks
but how about a picture signature, hosted by imageshack or whatever
something like:
[IMG]http://img379.imageshack.us/img379/8173/yodafv6.jpg[/IMG]

i tried to put that in the signature field but it only shows the text not the linked picture.



Just change line
        $vars['{SIGNATURE}'] = $signature;

to
        $vars['{SIGNATURE}'] = process_smilies(bb_decode($signature));

Also added the possibility to show smileys!


I will modify the source code i posted, because i think it's a general improvement.

MadMaxx

Quote from: Hein Traag on July 05, 2008, 01:51:45 PM
The idea is good but has a flaw, what if Imageshack goes down etc. It would be better to have the image stored on the same server as cpg imho.

that would be even better, but this is the next best thing  :)

@eenemeenemuu, that did it, thanks a lot

Αndré

#155
To detect url's and make them clickable automatically in message body and signature, you have to adapt the "make_clickable()" function.

Open adaptor/source/topic.view.php

find:
        $vars['{SIGNATURE}'] = $signature;
or (depending on which version of my hack you are using):
        $vars['{SIGNATURE}'] = process_smilies(bb_decode($signature));

and replace with:
        $vars['{SIGNATURE}'] = make_clickable(process_smilies(bb_decode($signature)));


To use this feature in the message body, find:
'{POST}'        => process_smilies(bb_decode($message['body'])),
and replace with:
'{POST}'        => make_clickable(process_smilies(bb_decode($message['body']))),



I modified my instruction to add signature again, to make url's clickable.



@foulu: Are you working further on this plugin? If not, i am thinking about creating a simple search engine for it, but it don't want to code sth. that's already done in your developing version ;)

Αndré

I've adapted a script (german only) for using buttons to insert bbcode in cpgforum.

1. Open "adaptor/js/scripts.js" and insert the following code at the end of the file:
function insert(aTag, eTag, form) {
  var input = document.forms[form].elements['post'];
  input.focus();
  /* für Internet Explorer */
  if(typeof document.selection != 'undefined') {
    /* Einfügen des Formatierungscodes */
    var range = document.selection.createRange();
    var insText = range.text;
    range.text = aTag + insText + eTag;
    /* Anpassen der Cursorposition */
    range = document.selection.createRange();
    if (insText.length == 0) {
      range.move('character', -eTag.length);
    } else {
      range.moveStart('character', aTag.length + insText.length + eTag.length);     
    }
    range.select();
  }
  /* für neuere auf Gecko basierende Browser */
  else if(typeof input.selectionStart != 'undefined')
  {
    /* Einfügen des Formatierungscodes */
    var start = input.selectionStart;
    var end = input.selectionEnd;
    var insText = input.value.substring(start, end);
    input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
    /* Anpassen der Cursorposition */
    var pos;
    if (insText.length == 0) {
      pos = start + aTag.length;
    } else {
      pos = start + aTag.length + insText.length + eTag.length;
    }
    input.selectionStart = pos;
    input.selectionEnd = pos;
  }
  /* für die übrigen Browser */
  else
  {
    /* Abfrage der Einfügeposition */
    var pos;
    var re = new RegExp('^[0-9]{0,3}$');
    while(!re.test(pos)) {
      pos = prompt("Einfügen an Position (0.." + input.value.length + "):", "0");
    }
    if(pos > input.value.length) {
      pos = input.value.length;
    }
    /* Einfügen des Formatierungscodes */
    var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:");
    input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos);
  }
}




2. Open "adaptor/include/HTMLelement.class.php" and insert just before:
}
?>

function bbcode($form_name) {
$bbcode_tags = array(
"b",
"u",
"i",
"img",
"url",
"email",
);
$html = "";
foreach ($bbcode_tags as $tag)
        $html .= "<input type=\"button\" class=\"button\" value=\"$tag\" onClick=\"javascript:insert('[$tag]', '[/$tag]', '$form_name')\"> ";
return $html;
    }




3. Open "adaptor/include/themes.inc.php" and insert before every (overall three times):
<tr>
<td class="tableb">{LANG_POST}</td>

<tr>
<td class="tableb">BBCode</td>
<td class="tableb">
        {BBCODE}
</td>
</tr>




4. Open "adaptor/source/topic.post.php" and add just before:
);
echo template_eval(

        '{BBCODE}'              => HTMLelement::bbcode("newtopic"),



5. Open "adaptor/source/msg.post.php" and add just before:
);
echo template_eval(

        '{BBCODE}'              => HTMLelement::bbcode("newmessage"),



6. Open "adaptor/source/msg.modify.php" and add just before:
);
echo template_eval(

        '{BBCODE}'              => HTMLelement::bbcode("modifymessage"),

MadMaxx

very nice, makes a great addition.

works perfectly with firefox but doesn't seem to work with IE.

MadMaxx

Quote from: MadMaxx on July 11, 2008, 03:23:28 PM
very nice, makes a great addition.

works perfectly with firefox but doesn't seem to work with IE.


sorry, don't mind this post, works perfectly in firefox and IE

i forgot to refresh the page  :-[

foulu

#159
Quote@foulu: Are you working further on this plugin? If not, i am thinking about creating a simple search engine for it, but it don't want to code sth. that's already done in your developing version Wink

I have been busy these days but it's not that I quit develop the plugin. If you thinking about creating a simple search engine, I can start but may be we need some thing to work together because the plugin in my localhost changes time to time. I think we will use PM to diccuss thing and leave this topic for support.