March 17, 2010, 10:21:47 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Private messages disabled
Caused by the massive abuse of the PM system in the past, the sending of personal messages has been disabled for all regular users on the Coppermine forum.
[more]
   Home   Help Search Board rules Login Register  
Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 19   Go Down
  Print  
Author Topic: Coppermine Forum Plugin (cpgforum)  (Read 114207 times)
0 Members and 1 Guest are viewing this topic.
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2574


aka eenemeenemuu


« Reply #140 on: June 04, 2008, 06: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
****
Gender: Male
Argentina Argentina

Posts: 1997


From San Juan, Argentina, to the World!


WWW
« Reply #141 on: June 04, 2008, 06:37:41 pm »

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

Code:
'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

I'm back! Smiley
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2574


aka eenemeenemuu


« Reply #142 on: June 04, 2008, 06: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
**
Gender: Male
Posts: 57


« Reply #143 on: June 04, 2008, 06: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, 09:46:41 am by dawid8 » Logged
Fabricio Ferrero
Dev Team member
****
Gender: Male
Argentina Argentina

Posts: 1997


From San Juan, Argentina, to the World!


WWW
« Reply #144 on: June 04, 2008, 07: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!!

* spanish.zip (8.28 KB - downloaded 144 times.)
Logged

Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

I'm back! Smiley
dawid8
Coppermine regular visitor
**
Gender: Male
Posts: 57


« Reply #145 on: June 04, 2008, 09:14:39 pm »

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

Gender: Male
United Kingdom United Kingdom

Posts: 13


WWW
« Reply #146 on: June 06, 2008, 01:59:55 pm »

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

* polish.zip (2.94 KB - downloaded 147 times.)
Logged
dawid8
Coppermine regular visitor
**
Gender: Male
Posts: 57


« Reply #147 on: June 06, 2008, 03:03:40 pm »

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

Thanks
Logged
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2574


aka eenemeenemuu


« Reply #148 on: June 08, 2008, 06: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:
'msg_not_exists' => "This message isn't exists.",
must be
Code:
'msg_not_exists' => "This message doesn't exist.",


-
muu

* german.zip (2.82 KB - downloaded 162 times.)
« Last Edit: June 10, 2008, 03:42:47 pm by eenemeenemuu » Logged

Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2574


aka eenemeenemuu


« Reply #149 on: June 12, 2008, 06: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:
echo template_eval($template, $vars);

add before:
Code:
        //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:
    <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:
    {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, 07:40:00 am by eenemeenemuu » Logged

MadMaxx
Coppermine novice
*
Posts: 23


« Reply #150 on: July 05, 2008, 10: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:
[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
****
Gender: Male
Netherlands Netherlands

Posts: 2155


A, B, Cpg


WWW
« Reply #151 on: July 05, 2008, 12: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
**
Gender: Male
Posts: 71

I <3 CPG!


WWW
« Reply #152 on: July 05, 2008, 02: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é
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2574


aka eenemeenemuu


« Reply #153 on: July 05, 2008, 03:55:59 pm »

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

to
Code:
        $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
*
Posts: 23


« Reply #154 on: July 06, 2008, 10: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  Smiley

@eenemeenemuu, that did it, thanks a lot
Logged
Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2574


aka eenemeenemuu


« Reply #155 on: July 09, 2008, 07: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:
        $vars['{SIGNATURE}'] = $signature;
or (depending on which version of my hack you are using):
Code:
        $vars['{SIGNATURE}'] = process_smilies(bb_decode($signature));

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


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

Αndré
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2574


aka eenemeenemuu


« Reply #156 on: July 11, 2008, 08: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:
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:
}
?>
Code:
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:
<tr>
<td class="tableb">{LANG_POST}</td>
Code:
<tr>
<td class="tableb">BBCode</td>
<td class="tableb">
        {BBCODE}
</td>
</tr>



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



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



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

MadMaxx
Coppermine novice
*
Posts: 23


« Reply #157 on: July 11, 2008, 02: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
*
Posts: 23


« Reply #158 on: July 11, 2008, 02: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  Embarrassed
Logged
foulu Topic starter
Contributor
***
Gender: Male
Posts: 225


uhm


« Reply #159 on: July 11, 2008, 05: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, 08:05:11 am by foulu » Logged

Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 19   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.108 seconds with 19 queries.