miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

All posts / replies on one page [RUSSIAN]

 
 
Page  Page 1 of 2:  1  2  Next »

Author usver
Partaker
#1 | Posted: 6 Dec 2005 05:26 
Zdravstvujjte.
Vash forum -- otlichnejjshaja veshh', vsjo prekrasno nastraivaetsja, bystro rabotaet.
No u menja est' takojj vopros: kak posmotret' vse stranicy topika. Naprimer, est' tema:
Nazvanie temy . 2 . 3 . vse .
Gde 2 i 3 -- nomera stranic, slovo «vse» - ssylka na stranicu so vsem soderzhimym topika. Chtoby sil'no ne gruzit' bazu, mozhno sdelat' knopku «vse», esli, naprimer, v topike ne bolee 10 stranic.
Prosto u menja na starom forume ehto bylo, narod privyk. Posle perevoda na miniBB vsem vsjo nravitsja, no ne khvataet takojj shtuki. Esli ehto ne slozhno, pomogite, pozhalujjsta. Dumaju, ehto ne samaja plokhaja ideja.
Vsem udachi, zaranee blagodaren.

Author Team
8-)
#2 | Posted: 6 Dec 2005 15:12 
Delo tut dazhe ne v zagruzke bazy... pover'te na slovo - dlja PHP/mySQL prakticheski bez raznicy, pometit' 10 zapisejj ili pometit' 100 zapisejj. Vopros tut v nenuzhnom traffike, kotoryjj budet atakovat' vash server.

No vot takojj plaginchik mozhete poprobovat' (on budet otobrazhat' ssylku Extra Pagination - Default Pagination, v templejjte main_posts.html nuzhno dobavit' {$allTopics} srazu posle {$pageNav}, naprimer, a sam kod vstavljaetsja v bb_plugins.php):

/* Limit thread pagination to 100 */
if($action=='vthread'){
if(isset($topicData[5]) and $topicData[5]>60 and $topicData[5]<=300){
if(isset($_GET['alltopics']
)) { $viewmaxreplys=100; $linkExtra=''; $linkText='Default Pagination'; $indexphp1=$indexphp; $indexphp.='alltopics=100&'; $mod_rewrite=FALSE; }
else { $linkExtra='alltopics=100&amp;'; $linkText='Extra Pagination'; $indexphp1=$indexphp; }
$allTopics=" <a href=\"{$main_url}/{$indexphp1}{$linkExtra}action=vthread&amp;forum={$ forum}&amp;topic={$topic}&amp;page={$page}\">{$linkText}</a>";
}
}
/* --Limit thread pagination to 100 */

Primechanie: esli u vas vkljuchen $mod_rewrite, ne udivljajjtes', chto pri razbivke stranic on ne budet rabotat' v rezhime "Extra Pagination". On i ne dolzhen v nem rabotat' vo izbezhanie duplicated content.

Odna stroka v kode po umolchaniju razbivaetsja... gde ={$ forum}& ne dolzhno byt' probela v kode mezhdu $ i forum.

Author usver
Partaker
#3 | Posted: 7 Dec 2005 10:05 
O, spasibo!
Sejjchas potestiruju.
Pro traffik kak-to i ne podumal.
a $mod_rewrite u menja otkljuchen.

Author Serg
Partaker
#4 | Posted: 9 Dec 2005 02:56 
Vsjo rabotaet, spasibo!

Author usver
Partaker
#5 | Posted: 9 Dec 2005 09:59 
Veshh' rabotaet. No delo v tom, chto esli v topike tol'ko odna stranica, to ssylka vse ravno prisutstvuet, a ehto ne est' gud. Poehtomu ja nemnogo peredelal i zapikhnul ehtot kod v bb_func_vthread.php gde to na 50 stroku pered proverkojj kolichestva stranic.

/* Limit thread pagination to 300*/
if ($numRows>30 and $numRows<=300) {
if(isset($_GET['alltopics']
)) { $viewmaxreplys=300; $linkExtra=''; $linkText='Split by pages'; $indexphp1=$indexphp; $indexphp.='alltopics=1&'; }
else { $linkExtra='alltopics=1&'; $linkText='Show all'; $indexphp1=$indexphp; }
$allTopics=...

grubo, no rabotaet. U menja limit - 30 soobshhenijj, mozhno, konechno, i peremennuju vmesto chisla ispol'zovat'. Takim obrazom, esli soobshhenijj bol'she 30 (bolee odnojj stanicy), to ssylka pojavitsja. No esli soobshhenijj bol'she 300 (bolee 10 stranic), to ssylki ne budet.
Vot.

Author Team
8-)
#6 | Posted: 9 Dec 2005 11:27 
Ja ispravil kod vverkhu - kol-vo soobshhenijj opredeljaetsja zadolgo do bb_func_vthread, tak chto na nego mozhno sdelat' proverku v plaginakh i izbavit'sja ot nenuzhnojj moroki pri apgrejjde root-skripta.

Author Serg
Partaker
#7 | Posted: 4 Sep 2006 19:03 
Primechanie: shtuka NE rabotaet s $mod_rewrite i ne mozhet s nej rabotat'

А vot takaya shtuka vrode rabotaet -

/* Limit thread pagination to all */
if($action=='vthread'){
if(isset($topicData[5]) and $topicData[5]>$viewmaxreplys){
if(isset($_GET['alltopics']
)) { $viewmaxreplys=$topicData[5]; $linkExtra=''; $linkText=''; }
else { $linkExtra='alltopics&amp;'; $linkText='all'; }
if(isset($mod_rewrite) and $mod_rewrite) $allTopics="{$linkText}";
else $allTopics="{$linkText}";
}
}
/* --Limit thread pagination to all */

pri ehtom v .htaccess nado vstavit' stroku:

RewriteRule ^([0-9]+)_([0-9]+)_(all+)\.html$ ./index.php? alltopics&action=vthread&forum=$1&topic=$2&page=all&mdrw=on

Author Paul
Lead Developer 
#8 | Posted: 5 Sep 2006 09:16 
Serg
Vy ne ponyali... Fraza "ne mozhet" otnositsya ne k tomu, chto ehto nel'zya sprogrammirovat', a k tomu, chto ehto NE NUZHNO... mod_rewrite -to zatachivaetsya pod nuzhdy poiskovika, a t.k. poiskovik UZHE uspeshno indeksiruet "razbivochnye" stranitsy po umolchaniyu; esli vy votknete mod_rewrite i v ehtot kod, to u vas budet to, chto nazyvaetsya duplicated content - ehto umen'shaet shansy lyubvi poiskovika k vashim forumam. Fershtejn? ;-)

Author Serg
Partaker
#9 | Posted: 5 Sep 2006 09:55 
Paul, ja sdelal ehto po dvum prichinam:

1. pri ispol'zovanii "redirect if visiting old URLs" ehta shtuka ne rabotala,

2. poiskoviki yandex i rambler, s kotorykh v osnovnom zakhodjat na mojj forum, indeksirujut i starye, i novye URLy, tak chto duplicated content i prezhde imel mesto.

Author Paul
Lead Developer 
#10 | Posted: 5 Sep 2006 10:30 
Ne znayu, kakoj versiej miniBB vy pol'zuetes', v poslednikh relizakh sdelan ochen' sil'nyj aktsent na duplicated content. V chastnosti, on otnositsya k sortirovke po temam (index.php?sortBy=1) - mozhete ubedit'sya, chto v ehtom sluchae vsegda vstavlyaetsya tehg NOINDEX,NOFOLLOW.

Esli chto-to i prezhde "imelo mesto", ehto ne znachit, chto vash kod vernyj. Vy, konechno, mozhete im pol'zovat'sya, no voobshche-to, poiskovik ne dolzhen indeksirovat' stranitsu s tem kontentom, kotoryj on uzhe proindeskiroval.

K tomu zhe, samoe glavnoe v vashem kode otsutstvuet... esli vklyuchen rezhim $mod_rewrite, to razbivka po stranitsam vse ravno budet "v starom rezhime"... v sluchae extra pagination, mod_rewrite vse-taki dolzhen vystavlyat'sya kak false, chtoby ona rabotala dlya tekushchego rasshirennogo rezhima. YA popravil pervonachal'nyj kod... vrode by dolzhno rabotat'.

Author Serg
Partaker
#11 | Posted: 5 Sep 2006 12:33 
samoe glavnoe v vashem kode otsutstvuet... esli vklyuchen rezhim $mod_rewrite, to razbivka po stranitsam vse ravno budet "v starom rezhime"...
Ne ponyal, ehto o chem? I razbivka, i vse posty na odnoj stranitse imeyut novye URLy...

Kstati, pri ispol'zovanii redirect if visiting old URLs i sortirovaka po temam ne rabotaet.

Author Paul
Lead Developer 
#12 | Posted: 5 Sep 2006 13:16 
V obshchem, zastavili vy menya-taki proinstallit' vash kod i posmotret', chto on delaet :-) Na moj vzglyad, ideya v korne nevernaya, potomu chto:

a) Kak ya uzhe napisal, poiskovik, indeksiruya "razbivochnye" stranitsy, vosprimet vash "all" kak duplicated content.

b) Vash kod "slepo" otobrazhaet VSE vozmozhnye soobshcheniya na odnoj stranitse - kak naschet togo, esli tema soderzhit 100, 200, 2000 soobshchenij? EHto vovse ne redkie primery. Poiskovik takoj stranitsej zakhlebnetsya i ne budet ee vsyu indeksirovat', tak chto pomimo duplicated content vy poluchite eshche i minus za gromozdkij razmer. Da eshche vam i traffika nakrutyat ogo-go.

V vysheupomyanutom primere ot Team vse-taki ispol'zuetsya bolee ratsional'nyj sposob razbivki - po 100 soobshchenij (ehto kol-vo, razumeetsya, mozhno izmenit'). Pod "extra"-razbivkoj stranits ya podrazumevayu sleduyushchee. Naprimer, u vas est' stroka razbivki, kotoraya vyglyadit tak:


Esli vklyuchen $mod_rewrite, to URL dlya ehtikh stranits dolzhny byt', naprimer, takie:

[1] - 8_355_0.html
[2] - 8_355_1.html
[3] - 8_355_2.html
[4] - 8_355_3.html

Esli vy vstavlyaete extra-pagination kod, privedennyj Team i popravlennyj mnoj, to URL dolzhny byt' takie:

. 1 . 2 . >> Extra Pagination

[1] - index.php?alltopics=100&action=vthread&forum=8&topic=355&page=0
[2] - index.php?alltopics=100&action=vthread&forum=8&topic=355&page=1

i tak dalee... T.e. razbivka "po umolchaniyu" prevrashchaetsya v ehkstra-razbivku po "mnogo" soobshchenij, pri ehtom razbivka kak takovaya sokhranyaetsya, no dlya nee stavitsya tehg NOINDEX,NOFOLLOW. YA ehto poproboval v nashej teme "Your impressions and wishes", gde bolee 100 soobshchenij, ehto rabotaet kak nado.

Po povodu "redirect if visiting old URLs" - ne ponimayu, pri chem tam sortirovka. EHto primer dlya pereadresatsii poiskovika so starogo tipa URL na novyj (mod_rewrite), esli na vashikh forumakh iznachal'no stoyal URL vida action=vthread&forum=X&topic=Y&page=Z.

V obshchem-to, ehtot kod tol'ko dlya spetsial'no ozabochennykh. MiniBB avtomaticheski spravlyaetsya s ehtim rezhimom, provereno nami lichno na nashikh zhe forumakh.

Author Serg
Partaker
#13 | Posted: 5 Sep 2006 13:35 
Vash kod "slepo" otobrazhaet VSE vozmozhnye soobshcheniya na odnoj stranitse - kak naschet togo, esli tema soderzhit 100, 200, 2000 soobshchenij

Nu ehto soobrazno pozhelaniyam v samom pervom poste temy, a takzhe yuzerov moego foruma :-) Dvukh tysyach soobshchenij u menya poka ne byvaet :-)
Pro NOINDEX,NOFOLLOW napishu pozzhe, kogda razberus' so vsevozmozhnymi variatsiyami URLov :-)

CHto kasaetsya "koda dlya ozabochennykh", to on perevodit vnutri foruma adres tipa action=vthread&forum=X&page=Z&sortBy=1(ili 0) v X_Z.html, kak i adres action=vthread&forum=X&page=Z, t.e. sortirovki "po temam" ne proiskhodit. To zhe samoe proiskhodit i s adresami tipa index.php?alltopics=100&action=vthread&forum=8&topic=355&page=0

Author Paul
Lead Developer 
#14 | Posted: 5 Sep 2006 13:40 
t.e. sortirovki "po temam" ne proiskhodit

Estestvenno, ne proiskhodit! Kak vy sebe predstavlyaete ideyu mod_rewrite v tselom? Esli stranitsa imeet adres vida "4_3329_0.html", to takaya stranitsa mozhet byt' TOL'KO ODNА, ponimaete? Sootvetstvenno, esli vy delaete sortirovku po temam pri vklyuchennom mod_rewrite, to razbivka po stranitsam sokhranyaetsya dlya rezhima "sortirovka po otvetam", ehto vpolne logichno...

Nelogichno zdes' tol'ko to, chto mozhno bylo by v ehtom sluchae "vyklyuchat'" mod_rewrite na razbivke, esli sortiruetsya po temam... ya podumayu ob ehtom v sled. versii ;-)

Author Serg
Partaker
#15 | Posted: 5 Sep 2006 13:52 
Esli stranitsa imeet adres vida "4_3329_0.html", to takaya stranitsa mozhet byt' TOL'KO ODNА, ponimaete?

Razumeetsya ponimayu :-) No togda "kod dlya ozabochennykh" nado menyat', ili ne ispol'zovat' ego vovse.

Page  Page 1 of 2:  1  2  Next » 
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 All posts / replies on one page [RUSSIAN]
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑