31
3lr0n
Re: News 1.64 + attachment of the image
  • 2009/11/24 18:04

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Is not necessary to use a hack as one of the new features of news 1.64 is this one, but the module is not coded to show this image in the index page, so a little modification is needed in code and templates.



32
3lr0n
Re: News 1.64 + attachment of the image
  • 2009/11/24 14:07

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13



in modules/news/index.php add in line 206 this line

$story['picture'] = $thisstory->picture();


and in the template file, news_item.html this code where youe need the image to be shown.

<{if $story.picture != ''}><img src="<{$xoops_url}>/modules/news/images/topics/<{$story.picture}>" alt="" align="left" style="margin-right: 5px; margin-bottom: 5px" /><{/if}>


regards



33
3lr0n
Re: Different editor per user group
  • 2009/11/17 20:43

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


I check this and work for me.

To set a different editor to module admins and to regular users chck line 187 in /modules/news/include/functions.php and replace this

$editor_option strtolower(news_getmoduleoption('form_options'));


with this

if (!news_is_admin_group($xoops_user)) {
    
$editor_option 'dhtml';
}  else {
  
$editor_option strtolower(news_getmoduleoption('form_options'));
}


I set the dhtml for regular users, you can set another of course while is installed

hope this can help someone
regards, 3lr0n



34
3lr0n
Re: Different editor per user group
  • 2009/11/10 14:38

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


anyone?



35
3lr0n
Re: Different editor per user group
  • 2009/11/8 11:12

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


line 93
file /modules/news/include/storyform.inc.php

$editor news_getWysiwygForm(_NW_THESCOOP'hometext'$hometext1560'hometext_hidden');
$sform->addElement($editortrue);


So the editor is choosen by the function news_getWysiwygForm, take a look to the function

line 187
file /modules/news/include/functions.php

function &news_getWysiwygForm($caption$name$value ''$width '100%'$height '400px'$supplemental='')
{
    
$editor_option strtolower(news_getmoduleoption('form_options'));
    
$editor false;
    
$editor_configs=array();
    
$editor_configs['name'] =$name;
    
$editor_configs['value'] = $value;
    
$editor_configs['rows'] = 35;
    
$editor_configs['cols'] = 60;
    
$editor_configs['width'] = '100%';
    
$editor_configs['height'] = '350px';
    
$editor_configs['editor'] = $editor_option;


So the editot, this time is set by news_getmoduleoption, another fuction.

The clue here is check if the user is admin so the editor returned by this function will be the one we want for module admins, and set in configuration the default editor for regular users.

Iam not a programmer, so anyone could help me?

Thks



36
3lr0n
Different editor per user group
  • 2009/11/7 9:27

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hello, I was wondering if it possible to have in news 1.64 a dhtml editor (xoops editor) for registered users and a more powerful one (ckeditor) for users in other group.

The reason is to have registered users sending news and special users that have the rights to approve the news that are send, in some cases this other group send more "complex" news or articles so they need for example access to html source, etc...

Its this possible?



37
3lr0n
Re: Upgrade from 2.3 to 2.4
  • 2009/10/28 23:17

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


+1



38
3lr0n
Re: Upgrade from 2.3 to 2.4
  • 2009/10/28 20:22

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


The instructions said "Choose the appropiatte upgrade package", but there arent any upgrade packages (mean from 2.3.3 to 2.4) only a full package?? Should i overwrite all the files as if it would be a scracth install?



39
3lr0n
Re: different editor per group
  • 2009/5/30 7:52

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


I think news call the editor somewhere (i cant find it now), so I think the best and easy way eill be to check the user groups and if is in, for example, editors, load the wysiwyg editor.. other cases the dhtml..

Is this possible?, and, where is the part the editor is loaded?

regards
3lr0n
Spanish Overclocking Community xoops based site : www.overclocking.es



40
3lr0n
different editor per group
  • 2009/5/29 12:08

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hi,

Im using news 1.63 and was wondering if I can have a different editor per group of users. I mean, for example, the registered users using DHTML and the editors (registered users on a special group with some admin rights) one editor that allows HTML, for example tinymce.

Is this possible?

Best regards
3lr0n
Spanish Overclocking Community xoops based site : www.overclocking.es




TopTop
« 1 2 3 (4) 5 6 7 ... 15 »



Login

Who's Online

162 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits