Skocz do zawartości


- - - - -

Modyfikacje IP.Board 3.0.x: (DB30) Hide CODE Content

db30 hide code content

  • Proszę się zalogować aby odpowiedzieć
29 odpowiedzi na ten temat

#21 Spanner

Spanner

    PHP & IP.Board Developer

  • Administrator
  • 5430 postów
  • Płeć:Mężczyzna
  • Skąd:KrK
  • Wersja:IP.Board 3.3.x

Napisany 08 luty 2011 - 07:12

Link to my paypal account you can find in my signature. Which portal? With quote you mean in editor?

#22 spencer

spencer

    IP.Board Newbie

  • Użytkownicy
  • Pip
  • 5 postów
  • Wersja:IP.Board 3.1.x

Napisany 08 luty 2011 - 18:00

Zobacz postSpanner, o 08 luty 2011 - 07:12, powiedział:

Link to my paypal account you can find in my signature. Which portal? With quote you mean in editor?

I mean when someone quotes or multiquotes the post with the hidden code they see the hidden part. And also for the Ipb portal. The hidden content shows there at the recent topics.

I did not see the paypal link. I will make it worth while. Are you available for paid work? You seem to know a lot about oding and I need several mods. Can you please pm your hourly rates?

#23 Spanner

Spanner

    PHP & IP.Board Developer

  • Administrator
  • 5430 postów
  • Płeć:Mężczyzna
  • Skąd:KrK
  • Wersja:IP.Board 3.3.x

Napisany 12 luty 2011 - 10:52

Editor:

try

Open: /admin/sources/handlers/han_editor.php

Find:

		if( $this->method == 'rte' )
		{
			$text = preg_replace( '#(<|&lt;|&amp;lt;|&\#60;)script#si', "&amp;lt;script", $text );
		}

Add below:

		if($this->settings['hcc_enable'])
		{
			$groups = explode(',', $this->settings['hcc_groups']);
			
			if(in_array($this->memberData['member_group_id'], $groups))
			{
				$text = preg_replace('#\[code\](?:[^\]]+?)\[\/code\]#', '[code]'.$this->settings['hcc_text'].'[ /code]',  $text);
			}
		}

Remember to replace [ /code] to [/code] :)
        

Portal

try

Open: /admin/applications/forums/extensions/portalPlugins/recent_topics.php

Find:      

$entry['post'] = IPSText::getTextClass( 'bbcode' )->memberViewImages( $entry['post'] );

Add below:

			if($this->settings['hcc_enable'])
			{
				$groups = explode(',', $this->settings['hcc_groups']);
				
				if(in_array($this->memberData['member_group_id'], $groups))
				{
					$entry['post'] = preg_replace('#<pre class=\'prettyprint\'>(?:[^\]]+?)</pre>#', '<pre class="prettyprint">'.$this->settings['hcc_text'].'</pre>',  $entry['post']);
				}
			}

That's all :)

#24 sanbi

sanbi

    IP.Board Newbie

  • Użytkownicy
  • Pip
  • 2 postów
  • Wersja:n/a

Napisany 13 luty 2011 - 20:53

i installed this mod and it's not working for me. When i use the hide hack, it doesn't hide the content but only shows the code like this:

[hide_me] [/hide_me] or [hide][/hide]

Can you please help me fix this? Thank You

#25 Duke_

Duke_

    Umie pomóc

  • Moderator Globalny
  • 1461 postów
  • Płeć:Mężczyzna
  • Skąd:Zweibrücken - Niemcy
  • Wersja:IP.Board 3.2.x

Napisany 13 luty 2011 - 21:04

in the ACP group setting that can not see what you have in the tag [code]

in posts do not have to intercede [hide]

P.S.
sorry for my English
Dodany obrazek 2.5 V6 i500 by Duke_ - Black Pearl

Dodany obrazek

Pomoglem ? Podziekuj naciskajac " + " to nic nie kosztuje a dobrze o Tobie swiadczy ;)

#26 sanbi

sanbi

    IP.Board Newbie

  • Użytkownicy
  • Pip
  • 2 postów
  • Wersja:n/a

Napisany 14 luty 2011 - 03:20

I'm sorry but i don't understand what you are saying. The members and I can still see the content even though i use the hide hack to hide it. Instead of the content being hidden, it shows the code instead. I put an image instead of text and my image isn't showing up either.

If someone can help me fix this so i can get this hide hack to work that would be great. Thank You!

#27 Fairlight

Fairlight

    IP.Board Newbie

  • Użytkownicy
  • Pip
  • 4 postów
  • Wersja:IP.Board 3.1.x

Napisany 15 luty 2011 - 15:14

Zobacz postSpanner, o 06 luty 2011 - 20:25, powiedział:

Try:

Find:
$post_data[$k][$key]['post'] = preg_replace('#<pre class=\'prettyprint\'>(.*?)</pre>#', '<pre class="prettyprint">'.$this->settings['hcc_text'].'</pre>',  $post['post']);

Reply with:
$post_data[$k][$key]['post'] = preg_replace('#<pre class=\'prettyprint\'>(?:[^\]]+?)</pre>#', '<pre class="prettyprint">'.$this->settings['hcc_text'].'</pre>',  $post['post']);


sorry i did not get back to you sooner. I was waiting for this week's spoilers to test it out. Unfortunately, you are right. it is difficult to get it to work on all occasions. Hiding this week's television spoilers does not work. :(

#28 spawn3d

spawn3d

    Powoli zdobywa wiedzę

  • Użytkownicy
  • PipPip
  • 97 postów
  • Wersja:n/a

Napisany 09 kwiecień 2011 - 19:28

Witam

Wykryłem dzisiaj, że modyfikacja nie działa do końca poprawnie. Otóż 1 link umieszczony w tagu code nie bedzie wyswietlony dla goscia i tu jest ok, jednak wystarczy dodac w tagu code 2 linki lub 1 link i kawalek tekstu (od nowego wiersza jak probowalem) no i juz sie sypie i kazdy widzi zawartosc tagu.

Wiekszosc ludzi wpisuje 1 link + lub cos tam dopisuje...Ogolnie mysle ze dla kazego moze to sprawiac w jakims stopniu problem. W jaki sposob to rozwiazac?

Edytowany przez spawn3d, 09 kwiecień 2011 - 19:32.


#29 Spanner

Spanner

    PHP & IP.Board Developer

  • Administrator
  • 5430 postów
  • Płeć:Mężczyzna
  • Skąd:KrK
  • Wersja:IP.Board 3.3.x

Napisany 10 kwiecień 2011 - 09:25

A próbowałeś rozwiązanie podane w tym temacie ? bo wydaje mi się, że nie

#30 spawn3d

spawn3d

    Powoli zdobywa wiedzę

  • Użytkownicy
  • PipPip
  • 97 postów
  • Wersja:n/a

Napisany 10 kwiecień 2011 - 18:57

Dziękuję i przepraszam za zamieszanie

Edytowany przez spawn3d, 10 kwiecień 2011 - 18:57.



[Invisionize.eu] IPS Company Blog - IP.Content 2.0 Dev Update: Interface Improvements to Pages , [Invisionize.eu] IPS Company Blog - IP.Content 2.1 Dev Update: Block Variable Help , Jak odzyskac dane | IPBoard 2.1.x , [Invisionize.eu] IP.Board 3.2.1, IP.Calendar 3.2.1, IP.Content 2.2.1, and IP.Nexus 1.3.1 Released , [Invisionize.eu] IPS Company Blog - IP.Board 3.3 and IP.Content 2.3 Coming Soon!



0 użytkowników czyta ten temat

0 użytkowników, 0 gości, 0 anonimowych użytkowników