Advanced search  

News:

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

Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 19   Go Down

Author Topic: Coppermine Forum Plugin (cpgforum)  (Read 382543 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Coppermine Forum Plugin (cpgforum)
« Reply #140 on: June 04, 2008, 07:28:35 pm »

fabri.. read nielsp's question carefully:
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
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1997
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Coppermine Forum Plugin (cpgforum)
« Reply #141 on: June 04, 2008, 07:37:41 pm »

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

Code: [Select]
'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.
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Coppermine Forum Plugin (cpgforum)
« Reply #142 on: June 04, 2008, 07:41:00 pm »

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

Logged

dawid8

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 57
Re: Coppermine Forum Plugin (cpgforum)
« Reply #143 on: June 04, 2008, 07:58:46 pm »

so her is the link >delete<

if you need a account you can sent me a pm
« Last Edit: June 16, 2008, 10:46:41 am by dawid8 »
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1997
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Coppermine Forum Plugin (cpgforum)
« Reply #144 on: June 04, 2008, 08:10:10 pm »

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

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

Catching up! :)

dawid8

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 57
Re: Coppermine Forum Plugin (cpgforum)
« Reply #145 on: June 04, 2008, 10:14:39 pm »

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

pixstreet

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • pixstreet.co.uk
Re: Coppermine Forum Plugin (cpgforum)
« Reply #146 on: June 06, 2008, 02:59:55 pm »

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

dawid8

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 57
Re: Coppermine Forum Plugin (cpgforum)
« Reply #147 on: June 06, 2008, 04:03:40 pm »

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

Thanks
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Coppermine Forum Plugin (cpgforum)
« Reply #148 on: June 08, 2008, 07:38:11 pm »

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:
Code: [Select]
'msg_not_exists' => "This message isn't exists.",must be
Code: [Select]
'msg_not_exists' => "This message doesn't exist.",

-
muu
« Last Edit: June 10, 2008, 04:42:47 pm by eenemeenemuu »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Coppermine Forum Plugin (cpgforum)
« Reply #149 on: June 12, 2008, 07:25:44 pm »

[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:
Code: [Select]
echo template_eval($template, $vars);
add before:
Code: [Select]
        //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:
Code: [Select]
    <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:
Code: [Select]
    {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
« Last Edit: July 09, 2008, 08:40:00 am by eenemeenemuu »
Logged

MadMaxx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Coppermine Forum Plugin (cpgforum)
« Reply #150 on: July 05, 2008, 11:49:47 am »

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:
Code: [Select]
[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.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Coppermine Forum Plugin (cpgforum)
« Reply #151 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.
Logged

ib2loud

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 77
  • I <3 CPG!
    • OKShowPics.com
Re: Coppermine Forum Plugin (cpgforum)
« Reply #152 on: July 05, 2008, 03:55:44 pm »

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

www.okshowpics.com/free
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Coppermine Forum Plugin (cpgforum)
« Reply #153 on: July 05, 2008, 04:55:59 pm »

works very nice, thanks
but how about a picture signature, hosted by imageshack or whatever
something like:
Code: [Select]
[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
Code: [Select]
        $vars['{SIGNATURE}'] = $signature;
to
Code: [Select]
        $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.
Logged

MadMaxx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Coppermine Forum Plugin (cpgforum)
« Reply #154 on: July 06, 2008, 11:48:24 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Coppermine Forum Plugin (cpgforum)
« Reply #155 on: July 09, 2008, 08:39:30 am »

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:
Code: [Select]
        $vars['{SIGNATURE}'] = $signature;or (depending on which version of my hack you are using):
Code: [Select]
        $vars['{SIGNATURE}'] = process_smilies(bb_decode($signature));
and replace with:
Code: [Select]
        $vars['{SIGNATURE}'] = make_clickable(process_smilies(bb_decode($signature)));

To use this feature in the message body, find:
Code: [Select]
'{POST}'        => process_smilies(bb_decode($message['body'])),and replace with:
Code: [Select]
'{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 ;)
« Last Edit: July 09, 2008, 08:45:23 am by eenemeenemuu »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Coppermine Forum Plugin (cpgforum)
« Reply #156 on: July 11, 2008, 09:14:14 am »

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:
Code: [Select]
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:
Code: [Select]
}
?>
Code: [Select]
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):
Code: [Select]
<tr>
<td class="tableb">{LANG_POST}</td>
Code: [Select]
<tr>
<td class="tableb">BBCode</td>
<td class="tableb">
        {BBCODE}
</td>
</tr>



4. Open "adaptor/source/topic.post.php" and add just before:
Code: [Select]
);
echo template_eval(
Code: [Select]
        '{BBCODE}'              => HTMLelement::bbcode("newtopic"),


5. Open "adaptor/source/msg.post.php" and add just before:
Code: [Select]
);
echo template_eval(
Code: [Select]
        '{BBCODE}'              => HTMLelement::bbcode("newmessage"),


6. Open "adaptor/source/msg.modify.php" and add just before:
Code: [Select]
);
echo template_eval(
Code: [Select]
        '{BBCODE}'              => HTMLelement::bbcode("modifymessage"),
Logged

MadMaxx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Coppermine Forum Plugin (cpgforum)
« Reply #157 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.
Logged

MadMaxx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Coppermine Forum Plugin (cpgforum)
« Reply #158 on: July 11, 2008, 03:28:05 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  :-[
Logged

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: Coppermine Forum Plugin (cpgforum)
« Reply #159 on: July 11, 2008, 06:23:05 pm »

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.
« Last Edit: July 12, 2008, 09:05:11 am by foulu »
Logged
Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 19   Go Up
 

Page created in 0.027 seconds with 20 queries.