News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

hidden for guests

Started by SeAlVa, May 16, 2007, 05:10:13 PM

Previous topic - Next topic

SeAlVa

Link to Mod

With this mod, authors can hide part of its messages (posts) to guests.

** In spanish **
Con esta mod, los autores podrán ocultar parte de sus mensajes (posts) a invitados


Mods made to get 1.0.3 version
- It now works with most of themes.
- If it is used between [code ] and [/code ] it use another sentence.

--------------
Languages available:
- Spanish (by me)
- English (by me)
- French (by not said yet)

Apllicmz

Hello when iam install i see that red erro




SeAlVa

sorry, there was a missing capital letter (Modifi...)

It must be fixed right now

Apllicmz




pvisser

Its an Super mod. But i think there is one Bug or isn't? Wen i pres the print button when i'm viewing the post as an geust. I see the hidden Coding also the hidden text. What can i do to hide that also.

PS. Thank is an Super mod..
Asavi Reluzz

babjusi

I get this eeeror message as well when trying to install this mod. Can you please, tell me how to fix it, cuase I would like to install this mod in my forum as I find it very handy. Thank you

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Themes/default/Post.template.php    Test successful
2.    Execute Modification    ./Sources/Search.php    Test successful
3.    Execute Modification    ./Sources/Recent.php    Test successful
4.    Execute Modification    ./Sources/Display.php    Test successful
5.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test failed
6.    Extract File    ./Themes/default/images/bbc/lockguest.gif    

Apllicmz

install that mod and open modifications english and puty
She work Good

$txt['hide_for_guests'] = 'Some part of this message have been locked';
$txt['hide_for_guests2'] = 'You have to <a href="./index.php?action=login">Log-In</a> to unlock it';
$txt['description_lock_guests'] = 'Hides part of your message to guests';



babjusi

Thank you for your answer joomlamz, but can you tell me where exactly to put that code, cause I ain''t so good with this coding thing.

Apllicmz

After this Code

$txt['ajax_in_progress']



babjusi

Thanks again, I will give it a try

babjusi

#10
Now it worked like a charm, thank you very much joomlamz

P.s. Should I enable this mode anywhere in order to function, or only installing would do

babjusi

I figured it out. I read the read me file and the solution was there

Apllicmz




babjusi

Yes, now it works fine. Thanks again for your help

pvisser

How about the printing function like the post above. joomlamz. Do you have an solution? for me. And i found this coding.

$txt['hide_for_guests'] = 'Some part of this message have been locked';
$txt['hide_for_guests2'] = 'You have to <a href="./index.php?action=login">Log-In</a> to unlock it';
$txt['description_lock_guests'] = 'Hides part of your message to guests';

Should it not be:

$txt['hide_for_guests1'] = 'Some part of this message have been locked';
$txt['hide_for_guests2'] = 'You have to <a href="./index.php?action=login">Log-In</a> to unlock it';
$txt['description_lock_guests'] = 'Hides part of your message to guests';

in the modifications file? because else $txt['hide_for_guests'] gives an undefined index error.
Asavi Reluzz

babjusi

Hi pvisser. Add exactly the code that joomlamz stated above and it will work for sure, like it did with me

pvisser

Oke I'm using SMF 1.1.2 and thats where the error came from. I fixed it whit the coding above. What about the printing button in each message? because Wen i pres the print button when i'm viewing the post as an geust. I see the hidden Coding also the hidden text. What can i do to hide that also. Please Advice
Asavi Reluzz

SeAlVa

ops, that's my fault. I lock the text in recent's posts, in search form, in normal view, but I forgot to lock it in Print view. I'm sorry, I'm with exams now. I will fix it when I finish them.

I apologize

SeAlVa

you can temporaly fix this problem by editing ./Sources/Printpage.php and adding require_once("./Sources/Display.php");
$row['body'] = preparehidecontent($row['body']);
after censorText($row['subject']);
censorText($row['body']);

stonedste

Ive installed this mod into 1.1.2 and done all the file modifications but posts are still not hidden to guests and im getting no error messages. Can't find anything to turn it on in the CP but i am running a different theme so maybe thats why its not working?

Advertisement: